From c49f0eace2e26cc2661b5badaf26f243017969df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20Utku=20ER=C5=9EAH=C4=B0NCE?= Date: Wed, 3 Jul 2024 11:49:14 +0300 Subject: [PATCH] small fix #722 --- app/js/app-utilities.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/js/app-utilities.js b/app/js/app-utilities.js index 6092313c..18009587 100644 --- a/app/js/app-utilities.js +++ b/app/js/app-utilities.js @@ -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) => {