Begin work on Issue 382 (improve multi-select performance)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1121 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-12-29 06:37:53 +00:00
parent ccc0c38887
commit 3b991ed9bb
1 changed files with 7 additions and 5 deletions

View File

@ -2077,7 +2077,7 @@ function BatchCommand(text) {
while (i--) { while (i--) {
var elem = elemsToAdd[i]; var elem = elemsToAdd[i];
// we ignore any selectors // we ignore any selectors
if (elem.id.substr(0,13) == "selectorGrip_") continue; if (!elem || elem.id.substr(0,13) == "selectorGrip_") continue;
// if it's not already there, add it // if it's not already there, add it
if (selectedElements.indexOf(elem) == -1) { if (selectedElements.indexOf(elem) == -1) {
selectedElements[j] = elem; selectedElements[j] = elem;
@ -2771,11 +2771,11 @@ function BatchCommand(text) {
},100); },100);
// clear out selection and set it to the new list // clear out selection and set it to the new list
canvas.clearSelection(); // canvas.clearSelection();
// FIXME: fix this, need to supply rect to getIntersectionList() // FIXME: fix this, need to supply rect to getIntersectionList()
canvas.addToSelection(getIntersectionList()); // canvas.addToSelection(getIntersectionList());
/* //*
// for each selected: // for each selected:
// - if newList contains selected, do nothing // - if newList contains selected, do nothing
// - if newList doesn't contain selected, remove it from selected // - if newList doesn't contain selected, remove it from selected
@ -2794,7 +2794,9 @@ function BatchCommand(text) {
} }
if (elemsToRemove.length > 0) if (elemsToRemove.length > 0)
canvas.removeFromSelection(elemsToRemove); canvas.removeFromSelection(elemsToRemove);
*/
canvas.addToSelection(newList);
//*/
break; break;
case "resize": case "resize":
// we track the resize bounding box and translate/scale the selected element // we track the resize bounding box and translate/scale the selected element