From 14eac24ffae93abbe1dad77e7f9ebc6a5bc87b6f Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Thu, 3 Sep 2009 17:03:07 +0000 Subject: [PATCH] Fixed rotate bug in Webkit in issue 163 git-svn-id: http://svg-edit.googlecode.com/svn/trunk@538 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 89e4ee5f..c658d959 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -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 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);