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
master
Alexis Deveria 2009-08-27 14:44:23 +00:00
parent 3c6f79a8c1
commit 60020d9cc2
1 changed files with 6 additions and 4 deletions

View File

@ -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) {