Fixed rotate bug in Webkit in issue 163
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@538 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -2675,6 +2675,7 @@ function SvgCanvas(c)
|
||||
|
||||
this.quickClone = function(elem) {
|
||||
// Hack for Firefox bugs where text element features aren't updated
|
||||
if(navigator.userAgent.indexOf('Gecko/') == -1) return elem;
|
||||
var clone = elem.cloneNode(true)
|
||||
elem.parentNode.insertBefore(clone, elem);
|
||||
elem.parentNode.removeChild(elem);
|
||||
@@ -2705,9 +2706,8 @@ function SvgCanvas(c)
|
||||
}
|
||||
else elem.setAttribute(attr, val);
|
||||
selectedBBoxes[i] = this.getBBox(elem);
|
||||
// FIXME: I think this 'if' is never accessed
|
||||
// When would we have a <text> element and be changing font-size, font-family, x, or y
|
||||
// so that it starts with "url(" ?
|
||||
// Use the Firefox quickClone hack for text elements with gradients or
|
||||
// where other text attributes are changed.
|
||||
if(elem.nodeName == 'text') {
|
||||
if((val+'').indexOf('url') == 0 || $.inArray(attr, ['font-size','font-family','x','y']) != -1) {
|
||||
elem = canvas.quickClone(elem);
|
||||
|
||||
Reference in New Issue
Block a user