Skip to content

Commit 348e170

Browse files
committed
Fix interaction/image tests
1 parent 0838c31 commit 348e170

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/plots/cartesian/dragbox.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,11 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
715715
// FIXME: code duplication with cartesian.plot
716716
if(fullLayout._glcanvas && fullLayout._glcanvas.size()) {
717717
fullLayout._glcanvas.each(function(d) {
718-
d.regl.clear({
719-
color: true
720-
});
718+
if (d.regl) {
719+
d.regl.clear({
720+
color: true
721+
});
722+
}
721723
});
722724
}
723725

src/plots/cartesian/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {
5151
// clear gl frame, if any, since we preserve drawing buffer
5252
if(fullLayout._glcanvas && fullLayout._glcanvas.size()) {
5353
fullLayout._glcanvas.each(function(d) {
54-
d.regl.clear({
55-
color: true
56-
});
54+
if (d.regl) {
55+
d.regl.clear({
56+
color: true
57+
});
58+
}
5759
});
5860
}
5961

8 Bytes
Loading

0 commit comments

Comments
 (0)