adding bug note

master
Mark MacKay 2021-01-01 13:56:30 -06:00
parent 72db5dacc9
commit c9077304c8
1 changed files with 3 additions and 2 deletions

View File

@ -2155,14 +2155,15 @@ var addToSelection = this.addToSelection = function(elemsToAdd, showGrips) {
} }
} }
call("selected", selectedElements); call("selected", selectedElements);
selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips) // todo Bug: if duplicated with shift it will deselect and cause an error
if (selectedElements[0]) selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips)
// make sure the elements are in the correct order // make sure the elements are in the correct order
// See: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition // See: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
selectedElements.sort(function(a,b) { selectedElements.sort(function(a,b) {
if(a && b && a.compareDocumentPosition) { if(a && b && a.compareDocumentPosition) {
return 3 - (b.compareDocumentPosition(a) & 6); return 3 - (b.compareDocum`entPosition(a) & 6);
} else if(a == null) { } else if(a == null) {
return 1; return 1;
} }