Implemented SimpleLine in report viewer

This commit is contained in:
PMKuipers 2023-07-18 16:15:58 +02:00
parent 448b61f8f1
commit d1e5e22854
2 changed files with 3 additions and 19 deletions

View File

@ -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;

View File

@ -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;
}