Skip to content

Commit a5a719c

Browse files
committed
get snapshot redraw function right for (new) polar
1 parent 4cdc301 commit a5a719c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/snapshot/helpers.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ exports.getDelay = function(fullLayout) {
1919
};
2020

2121
exports.getRedrawFunc = function(gd) {
22+
var fullLayout = gd._fullLayout || {};
23+
var hasPolar = fullLayout._has && fullLayout._has('polar');
24+
var hasLegacyPolar = !hasPolar && gd.data && gd.data[0] && gd.data[0].r;
2225

23-
// do not work if polar is present
24-
if((gd.data && gd.data[0] && gd.data[0].r)) return;
26+
// do not work for legacy polar
27+
if(hasLegacyPolar) return;
2528

2629
return function() {
2730
(gd.calcdata || []).forEach(function(d) {

0 commit comments

Comments
 (0)