From d1e5e2285496db378a8c62fa402b9452bb70ea97 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Tue, 18 Jul 2023 16:15:58 +0200 Subject: [PATCH] Implemented SimpleLine in report viewer --- amd/src/report-viewer-components.js | 9 ++------- css/devstyles.css | 13 +------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/amd/src/report-viewer-components.js b/amd/src/report-viewer-components.js index 887e6e1..8b64efe 100644 --- a/amd/src/report-viewer-components.js +++ b/amd/src/report-viewer-components.js @@ -4,7 +4,7 @@ /*eslint-env es6*/ // Put this file in path/to/plugin/amd/src -import LeaderLine from './leaderline'; +import {SimpleLine} from './simpleline'; import {get_strings} from 'core/str'; import {load_strings} from './string-helper'; import {call} from 'core/ajax'; @@ -448,14 +448,9 @@ export default { // draw new line... let start = document.getElementById('studyitem-'+conn.from_id); let end= document.getElementById('studyitem-'+conn.to_id); - LeaderLine.positionByWindowResize = false; if(start !== null && end !== null && isVisible(start) && isVisible(end)){ - lineinfo.line = new LeaderLine(start,end,{ + lineinfo.line = new SimpleLine(start,end,{ color: lineColor, - startSocket: 'right', - endSocket: 'left', - startSocketGravity: 75, - endSocketGravity: 75, }); let elmWrapper = (this.plan.id >=0)?document.getElementById('studyplan-linewrapper-'+this.plan.id):null; diff --git a/css/devstyles.css b/css/devstyles.css index f148b07..bb3d574 100644 --- a/css/devstyles.css +++ b/css/devstyles.css @@ -513,12 +513,6 @@ a.t-item-course-config { transform: translate(-50%, -50%); } - -.l-leaderline-linewrapper { - width: 0; - height: 0; - position: relative; /* Origin of coordinates for lines, and scrolled content (i.e. not `absolute`) */ -} /******************************************************************************/ .r-report-tabs .list-group-item-action { @@ -528,6 +522,7 @@ a.t-item-course-config { .r-studyplan-content { overflow-y: visible; width: min-content; + position: relative; } .r-studyplan-tab, @@ -705,12 +700,6 @@ a.t-item-course-config { fill: #ccc; } -.r-studyplan-line-wrapper { - width: 0; - height: 0; - position: relative; /* Origin of coordinates for lines, and scrolled content (i.e. not `abcomsolute`) */ -} - .r-item-module-children { list-style: none; }