Skip to content

Commit

Permalink
small fix #722
Browse files Browse the repository at this point in the history
  • Loading branch information
umut-er committed Jul 3, 2024
1 parent f78289d commit c49f0ea
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/js/app-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -3856,9 +3856,14 @@ appUtilities.removeDuplicateProcessesAfterQuery = function() {
collectionArray.push(node.union(edge));
})
collectionArray.sort( (first, second) => {
var firstLabel = first.filter("node").data("label") || first.filter("node").data("class");
var secondLabel = second.filter("node").data("label") || second.filter("node").data("class");
return firstLabel.localeCompare(secondLabel);
var firstNodeLabel = first.filter("node").data("label") || first.filter("node").data("class");
var secondNodeLabel = second.filter("node").data("label") || second.filter("node").data("class");
var compare = firstNodeLabel.localeCompare(secondNodeLabel);
if(compare != 0)
return compare;
var firstEdgeClass = first.filter("edge").data("label") || first.filter("edge").data("class");
var secondEdgeClass = second.filter("edge").data("label") || second.filter("edge").data("class");
return firstEdgeClass.localeCompare(secondEdgeClass);
});

collectionArray.forEach( (item) => {
Expand Down

0 comments on commit c49f0ea

Please sign in to comment.