Skip to content

Commit

Permalink
fix highlight brutta visualizzazione
Browse files Browse the repository at this point in the history
  • Loading branch information
jfabi88 committed May 19, 2024
1 parent 3018802 commit 718750c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions relation.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,13 @@ class Relation {

this.highlightGroup(this.currentGroup, "highlightersSort");

// Rendiamo i vecchi higlighters grigi
for (var i = 0; i < this.highlighters.length; i++)
this.highlighters[i].stroke = "#c0c0c0";

// Andiamo a rimuovere gli higlighters sort e a riaggungerli in modo che vengano disegnati davanti
this.group.remove(this.highlightersSort);
this.group.add(this.highlightersSort);
}


Expand Down Expand Up @@ -239,15 +244,14 @@ class Relation {

// metti questo come first frame of row
firstFrameOfRow = currentFrame;
this.group.add(highlighters[highlighters.length - 1]);
}
// Se e' l'ultimo elemento del gruppo, disegna l'highlighter
if (i == group.length - 1) {
highlighters.push(this.makeRectangleAroundFrames(firstFrameOfRow, currentFrame, this[nameHighl + "Color"], this[nameHighl + "Margin"]));
this.group.add(highlighters[highlighters.length - 1]);
}

// Aggiungiamo l'highlighter appena creato al gruppo della relation
this.group.add(highlighters[highlighters.length - 1]);

// metti questo come last frame of row
lastFrameOfRow = currentFrame;
}
Expand All @@ -259,8 +263,6 @@ class Relation {
this.groupHighlighted = groupNode;
}
else if (nameHighl == "highlightersSort") {
console.log("setting groupHighlightedSort: ");
console.log(groupNode);
this.groupHighlightedSort = groupNode;
}

Expand Down

0 comments on commit 718750c

Please sign in to comment.