From 54e20edef2f945cb2d8be2eb517fbbc81922a115 Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Mon, 29 Jun 2009 13:46:50 +0000 Subject: [PATCH] Selector was not being hidden upon undo git-svn-id: http://svg-edit.googlecode.com/svn/trunk@223 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 4fb556dd..78184816 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -542,9 +542,8 @@ function SvgCanvas(c) if (selected == newSelected) return; // remove selected outline from previously selected element - if (selected != null && theSelector != null) { + if (theSelector != null) { selectorManager.releaseSelector(theSelector); - theSelector = selectorManager.requestSelector(selected); } selected = newSelected; @@ -552,11 +551,9 @@ function SvgCanvas(c) if (selected != null) { selectedBBox = selected.getBBox(); - // we create this element lazily for the first time here - if (theSelector == null) { - theSelector = selectorManager.requestSelector(selected); - console.log(theSelector); - } + // the manager gives us a selector + theSelector = selectorManager.requestSelector(selected); + // recalculate size and then re-append to bottom of document recalculateSelectedOutline();