Added 'selectNew' config option to disable auto-selection when an element is created
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1911 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
28b9c0cfd7
commit
7ce0c3336b
|
@ -112,6 +112,7 @@ var svgns = "http://www.w3.org/2000/svg",
|
||||||
// Default configuration options
|
// Default configuration options
|
||||||
var curConfig = {
|
var curConfig = {
|
||||||
show_outside_canvas: true,
|
show_outside_canvas: true,
|
||||||
|
selectNew: true,
|
||||||
dimensions: [640, 480]
|
dimensions: [640, 480]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3527,8 +3528,10 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
|
||||||
if(current_mode === "path") {
|
if(current_mode === "path") {
|
||||||
pathActions.toEditMode(element);
|
pathActions.toEditMode(element);
|
||||||
} else {
|
} else {
|
||||||
|
if(curConfig.selectNew) {
|
||||||
selectOnly([element], true);
|
selectOnly([element], true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// we create the insert command that is stored on the stack
|
// we create the insert command that is stored on the stack
|
||||||
// undo means to call cmd.unapply(), redo means to call cmd.apply()
|
// undo means to call cmd.unapply(), redo means to call cmd.apply()
|
||||||
addCommandToHistory(new InsertElementCommand(element));
|
addCommandToHistory(new InsertElementCommand(element));
|
||||||
|
|
Loading…
Reference in New Issue