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) {
|
this.quickClone = function(elem) {
|
||||||
// Hack for Firefox bugs where text element features aren't updated
|
// Hack for Firefox bugs where text element features aren't updated
|
||||||
|
if(navigator.userAgent.indexOf('Gecko/') == -1) return elem;
|
||||||
var clone = elem.cloneNode(true)
|
var clone = elem.cloneNode(true)
|
||||||
elem.parentNode.insertBefore(clone, elem);
|
elem.parentNode.insertBefore(clone, elem);
|
||||||
elem.parentNode.removeChild(elem);
|
elem.parentNode.removeChild(elem);
|
||||||
@@ -2705,9 +2706,8 @@ function SvgCanvas(c)
|
|||||||
}
|
}
|
||||||
else elem.setAttribute(attr, val);
|
else elem.setAttribute(attr, val);
|
||||||
selectedBBoxes[i] = this.getBBox(elem);
|
selectedBBoxes[i] = this.getBBox(elem);
|
||||||
// FIXME: I think this 'if' is never accessed
|
// Use the Firefox quickClone hack for text elements with gradients or
|
||||||
// When would we have a <text> element and be changing font-size, font-family, x, or y
|
// where other text attributes are changed.
|
||||||
// so that it starts with "url(" ?
|
|
||||||
if(elem.nodeName == 'text') {
|
if(elem.nodeName == 'text') {
|
||||||
if((val+'').indexOf('url') == 0 || $.inArray(attr, ['font-size','font-family','x','y']) != -1) {
|
if((val+'').indexOf('url') == 0 || $.inArray(attr, ['font-size','font-family','x','y']) != -1) {
|
||||||
elem = canvas.quickClone(elem);
|
elem = canvas.quickClone(elem);
|
||||||
|
|||||||
Reference in New Issue
Block a user