From 7ce0c3336baf42badb86c543c41f19a445f5c3c9 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Thu, 13 Jan 2011 16:17:00 +0000 Subject: [PATCH] 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-75d572ba1ddd --- editor/svgcanvas.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index a0208ca1..ea9d5bd2 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -112,6 +112,7 @@ var svgns = "http://www.w3.org/2000/svg", // Default configuration options var curConfig = { show_outside_canvas: true, + selectNew: true, dimensions: [640, 480] }; @@ -3527,7 +3528,9 @@ var getMouseTarget = this.getMouseTarget = function(evt) { if(current_mode === "path") { pathActions.toEditMode(element); } else { - selectOnly([element], true); + if(curConfig.selectNew) { + selectOnly([element], true); + } } // we create the insert command that is stored on the stack // undo means to call cmd.unapply(), redo means to call cmd.apply()