diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/boxes.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/boxes.js b/src/boxes.js index 2595f25..eca32ec 100644 --- a/src/boxes.js +++ b/src/boxes.js @@ -10,13 +10,11 @@ SVG.BBox = SVG.invent({ // find native bbox box = element.node.getBBox() } catch(e) { - try{ - // clone element to visible place to get bbox (FF fix) + if(element instanceof SVG.Shape){ var clone = element.clone().addTo(SVG.parser.draw) box = clone.bbox() clone.remove() - } catch(e) { - // mimic bbox + }else{ box = { x: element.node.clientLeft , y: element.node.clientTop |