From 0b5b0eb4842c0bad045a69981d00cba7010f8d31 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Thu, 22 Oct 2015 17:20:45 +0200 Subject: bbox loop (fix #392) --- src/boxes.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3