Fix Issue 412: Press 'A' to select all elements in the current layer
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1312 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -2217,7 +2217,7 @@ function BatchCommand(text) {
|
||||
while (i--) {
|
||||
var elem = elemsToAdd[i];
|
||||
// we ignore any selectors
|
||||
if (!elem || elem.id.substr(0,13) == "selectorGrip_") continue;
|
||||
if (!elem || elem.id.substr(0,13) == "selectorGrip_" || !this.getBBox(elem)) continue;
|
||||
// if it's not already there, add it
|
||||
if (selectedElements.indexOf(elem) == -1) {
|
||||
selectedElements[j] = elem;
|
||||
@@ -5656,6 +5656,18 @@ function BatchCommand(text) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Function: selectAllInCurrentLayer
|
||||
// Clears the selection, then adds all elements in the current layer to the selection.
|
||||
// This function then fires the selected event.
|
||||
this.selectAllInCurrentLayer = function() {
|
||||
if (current_layer) {
|
||||
canvas.clearSelection();
|
||||
canvas.addToSelection($(current_layer).children());
|
||||
current_mode = "select";
|
||||
call("selected", selectedElements);
|
||||
}
|
||||
};
|
||||
|
||||
// Function: clear
|
||||
// Clears the current document. This is not an undoable action.
|
||||
|
||||
Reference in New Issue
Block a user