Skip to content

Commit f6da314

Browse files
author
Mark Robinson
committed
Reduce complexity of recursive selection
1 parent 21212a9 commit f6da314

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/resources/static/js/workflow.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,11 @@ require(['jquery', 'jquery.svg', 'jquery.svgdom'],
377377
var rootID = root.attr("id");
378378
for (var i = 0; i < graphModel[rootID][listName].length; i++) {
379379
var next = $("#" + graphModel[rootID][listName][i]);
380-
next.find("polygon").addClass("selected");
381-
getTableRow(next).addClass("selected");
382-
expandSelection(next, listName);
380+
if (!next.find("polygon").hasClass("selected")) {
381+
next.find("polygon").addClass("selected");
382+
getTableRow(next).addClass("selected");
383+
expandSelection(next, listName);
384+
}
383385
}
384386
}
385387

0 commit comments

Comments
 (0)