We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e81942a commit aefd2abCopy full SHA for aefd2ab
test/jasmine/assets/get_bbox.js
@@ -15,7 +15,7 @@ module.exports = function getBBox(element) {
15
if(!clipPathAttr) return elementBBox;
16
17
// only supports 'url(#<id>)' at the moment
18
- var clipPathId = clipPathAttr.substring(5, clipPathAttr.length - 1);
+ var clipPathId = clipPathAttr.substring(6, clipPathAttr.length - 2);
19
var clipBBox = getClipBBox(clipPathId);
20
21
return minBBox(elementBBox, clipBBox);
@@ -28,8 +28,7 @@ function getClipBBox(clipPathId) {
28
try {
29
// this line throws an error in FF (38 and 45 at least)
30
clipBBox = clipPath.node().getBBox();
31
- }
32
- catch(e) {
+ } catch(e) {
33
// use DOM attributes as fallback
34
var path = d3.select(clipPath.node().firstChild);
35
0 commit comments