Fixed Issue 98: Blank text field deactives the Selection tool

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@447 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-08-21 20:12:01 +00:00
parent 7b31879ec2
commit fa0ea55521
1 changed files with 11 additions and 2 deletions

View File

@ -2262,8 +2262,17 @@ function SvgCanvas(c)
this.getBBox = function(elem) {
var selected = elem || selectedElements[0];
if(selected.textContent == '') {
selected.textContent = 'a'; // Some character needed for the selector to use.
var ret = selected.getBBox();
selected.textContent = '';
} else {
var ret = selected.getBBox();
}
// get the bounding box from the DOM (which is in that element's coordinate system)
return selected.getBBox();
return ret;
};
this.getRotationAngle = function(elem) {
@ -2400,7 +2409,7 @@ function SvgCanvas(c)
while(i--) {
var elem = elems[i];
if (elem == null) continue;
var oldval = (attr == "#text" ? elem.textContent : elem.getAttribute(attr));
if (oldval != val) {
if (attr == "#text") elem.textContent = val;