diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 9f252b02..35587f93 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -376,17 +376,19 @@ canvas.undoMgr = new svgedit.history.UndoManager({ if (values["stdDeviation"]) { canvas.setBlurOffsets(cmd.elem.parentNode, values["stdDeviation"]); } - + // This is resolved in later versions of webkit, perhaps we should + // have a featured detection for correct 'use' behavior? + // —————————— // Remove & Re-add hack for Webkit (issue 775) - if(cmd.elem.tagName === 'use' && svgedit.browser.isWebkit()) { - var elem = cmd.elem; - if(!elem.getAttribute('x') && !elem.getAttribute('y')) { - var parent = elem.parentNode; - var sib = elem.nextSibling; - parent.removeChild(elem); - parent.insertBefore(elem, sib); - } - } + //if(cmd.elem.tagName === 'use' && svgedit.browser.isWebkit()) { + // var elem = cmd.elem; + // if(!elem.getAttribute('x') && !elem.getAttribute('y')) { + // var parent = elem.parentNode; + // var sib = elem.nextSibling; + // parent.removeChild(elem); + // parent.insertBefore(elem, sib); + // } + //} } } } diff --git a/editor/svgutils.js b/editor/svgutils.js index 47aae348..7105c583 100644 --- a/editor/svgutils.js +++ b/editor/svgutils.js @@ -497,14 +497,17 @@ svgedit.utilities.getBBox = function(elem) { if(elname === 'use') { if(!ret) ret = selected.getBBox(); - if(!svgedit.browser.isWebkit()) { + // This is resolved in later versions of webkit, perhaps we should + // have a featured detection for correct 'use' behavior? + // —————————— + //if(!svgedit.browser.isWebkit()) { var bb = {}; bb.width = ret.width; bb.height = ret.height; bb.x = ret.x + parseFloat(selected.getAttribute('x')||0); bb.y = ret.y + parseFloat(selected.getAttribute('y')||0); ret = bb; - } + //} } else if(~visElems_arr.indexOf(elname)) { try { ret = selected.getBBox();} catch(e) {