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
This commit is contained in:
@@ -277,11 +277,13 @@ function SvgCanvas(c)
|
|||||||
this.showGrips = function(show) {
|
this.showGrips = function(show) {
|
||||||
// TODO: use suspendRedraw() here
|
// TODO: use suspendRedraw() here
|
||||||
var bShow = show ? "inline" : "none";
|
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) {
|
for (dir in this.selectorGrips) {
|
||||||
this.selectorGrips[dir].setAttribute("display", bShow);
|
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
|
// Updates cursors for corner grips on rotation so arrows point the right way
|
||||||
@@ -1155,7 +1157,7 @@ function SvgCanvas(c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(showGrips) {
|
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");
|
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 it was being dragged/resized
|
||||||
if (x != start_x || y != start_y) {
|
if (x != start_x || y != start_y) {
|
||||||
|
|||||||
Reference in New Issue
Block a user