Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7107c07

Browse files
committed
images: don't try to clip <image> is clip axes are blank
- looks like the browsers ignored clip paths that have corresponding no <defs> item, but not all renders can support them (e.g. Batik - which lead to eps and pdf export failures).
1 parent 1ace283 commit 7107c07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/images/draw.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ module.exports = function draw(gd) {
9494
}
9595

9696
function applyAttributes(d) {
97-
9897
var thisImage = d3.select(this);
9998

10099
// Axes if specified
@@ -142,7 +141,9 @@ module.exports = function draw(gd) {
142141
yId = yref ? yref._id : '',
143142
clipAxes = xId + yId;
144143

145-
thisImage.call(Drawing.setClipUrl, 'clip' + fullLayout._uid + clipAxes);
144+
if(clipAxes) {
145+
thisImage.call(Drawing.setClipUrl, 'clip' + fullLayout._uid + clipAxes);
146+
}
146147
}
147148

148149

0 commit comments

Comments
 (0)