From 223d5352e7b78d433fb019a788e4f64b19b8e904 Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Wed, 26 Aug 2009 21:50:35 +0000 Subject: [PATCH] Minor tweak to getIntersectionList(). Added comment for Issue 129. git-svn-id: http://svg-edit.googlecode.com/svn/trunk@479 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index f79f28d3..4af6cb6e 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -349,6 +349,10 @@ function SvgCanvas(c) // align selector group with element coordinate axes var transform = this.selectedElement.getAttribute("transform"); + // TODO: fix Issue 129 here (and other places). For some reason, WebKit sometimes + // returns matrix(a,b,c,d,e,f) instead of the things that we've set + // (like rotate(a,cx,cy) or translate(tx,ty)) + // I haven't been able to create a reduced test case yet though if (transform && transform != "") { // this.selectorGroup.setAttribute("transform", transform); var rotind = transform.indexOf("rotate("); @@ -593,8 +597,9 @@ function SvgCanvas(c) // need to do this since the defs has no bbox and causes an exception // to be thrown in Mozilla try { - if (nodes[i].id != "selectorParentGroup" && canvas.getBBox(nodes[i])) { - curBBoxes.push({'elem':nodes[i], 'bbox':canvas.getBBox(nodes[i])}); + var box = canvas.getBBox(nodes[i]); + if (nodes[i].id != "selectorParentGroup" && box) { + curBBoxes.push({'elem':nodes[i], 'bbox':box}); } } catch(e) { // do nothing, this element did not have a bbox