Skip to content

Commit aefd2ab

Browse files
committed
fixup getBBox test asset
1 parent e81942a commit aefd2ab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/jasmine/assets/get_bbox.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = function getBBox(element) {
1515
if(!clipPathAttr) return elementBBox;
1616

1717
// only supports 'url(#<id>)' at the moment
18-
var clipPathId = clipPathAttr.substring(5, clipPathAttr.length - 1);
18+
var clipPathId = clipPathAttr.substring(6, clipPathAttr.length - 2);
1919
var clipBBox = getClipBBox(clipPathId);
2020

2121
return minBBox(elementBBox, clipBBox);
@@ -28,8 +28,7 @@ function getClipBBox(clipPathId) {
2828
try {
2929
// this line throws an error in FF (38 and 45 at least)
3030
clipBBox = clipPath.node().getBBox();
31-
}
32-
catch(e) {
31+
} catch(e) {
3332
// use DOM attributes as fallback
3433
var path = d3.select(clipPath.node().firstChild);
3534

0 commit comments

Comments
 (0)