Fixed Issue 128 and other Firefox/text bugs

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@492 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-08-28 13:19:47 +00:00
parent 40cb7c0593
commit 3a1559b5da
1 changed files with 6 additions and 3 deletions

View File

@ -1365,7 +1365,8 @@ function SvgCanvas(c)
// fix for bug where text elements were always 50% opacity
"opacity": current_opacity,
"font-size": current_font_size,
"font-family": current_font_family
"font-family": current_font_family,
"text-anchor": "middle"
}
});
newText.textContent = "text";
@ -2598,8 +2599,10 @@ function SvgCanvas(c)
}
else elem.setAttribute(attr, val);
selectedBBoxes[i] = this.getBBox(elem);
if(elem.nodeName == 'text' && (val+'').indexOf('url') == 0) {
elem = canvas.quickClone(elem);
if(elem.nodeName == 'text') {
if((val+'').indexOf('url') == 0 || $.inArray(attr, ['font-size','x','y']) != -1) {
elem = canvas.quickClone(elem);
}
}
// Timeout needed for Opera & Firefox
setTimeout(function() {