From 60020d9cc2cab463b9bbeb7e11cf1bc3796eaa62 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Thu, 27 Aug 2009 14:44:23 +0000 Subject: [PATCH] Fixed bug where rotator handle wouldn't appear on text elements git-svn-id: http://svg-edit.googlecode.com/svn/trunk@488 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 477ea81b..01b5ea15 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -277,11 +277,13 @@ function SvgCanvas(c) this.showGrips = function(show) { // TODO: use suspendRedraw() here var bShow = show ? "inline" : "none"; + this.rotateGrip.setAttribute("display", bShow); + this.rotateGripConnector.setAttribute("display", bShow); + var elem = this.selectedElement; + if(elem && elem.tagName == "text") bShow = "none"; for (dir in this.selectorGrips) { this.selectorGrips[dir].setAttribute("display", bShow); } - this.rotateGrip.setAttribute("display", bShow); - this.rotateGripConnector.setAttribute("display", bShow); }; // Updates cursors for corner grips on rotation so arrows point the right way @@ -1155,7 +1157,7 @@ function SvgCanvas(c) } if(showGrips) { - selectorManager.requestSelector(selectedElements[0]).showGrips(elem.tagName != "text"); + selectorManager.requestSelector(selectedElements[0]).showGrips(true); } }; @@ -1805,7 +1807,7 @@ function SvgCanvas(c) current_font_family = selected.getAttribute("font-family"); } - selectorManager.requestSelector(selected).showGrips(selected.tagName != "text"); + selectorManager.requestSelector(selected).showGrips(true); } // if it was being dragged/resized if (x != start_x || y != start_y) {