Skip to content

Commit 2190e2c

Browse files
committed
disbale interactions with pie & funnelarea when staticPlot is true
1 parent e32fe28 commit 2190e2c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/traces/funnelarea/plot.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ var positionTitleOutside = piePlot.positionTitleOutside;
2525
var formatSliceLabel = piePlot.formatSliceLabel;
2626

2727
module.exports = function plot(gd, cdModule) {
28+
var isStatic = gd._context.staticPlot;
29+
2830
var fullLayout = gd._fullLayout;
2931

3032
clearMinTextSize('funnelarea', fullLayout);
@@ -63,7 +65,7 @@ module.exports = function plot(gd, cdModule) {
6365

6466
slicePath.enter().append('path')
6567
.classed('surface', true)
66-
.style({'pointer-events': 'all'});
68+
.style({'pointer-events': isStatic ? 'none' : 'all'});
6769

6870
sliceTop.call(attachFxHandlers, gd, cd);
6971

src/traces/pie/plot.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ var eventData = require('./event_data');
2020
var isValidTextValue = require('../../lib').isValidTextValue;
2121

2222
function plot(gd, cdModule) {
23+
var isStatic = gd._context.staticPlot;
24+
2325
var fullLayout = gd._fullLayout;
2426
var gs = fullLayout._size;
2527

@@ -71,7 +73,7 @@ function plot(gd, cdModule) {
7173

7274
slicePath.enter().append('path')
7375
.classed('surface', true)
74-
.style({'pointer-events': 'all'});
76+
.style({'pointer-events': isStatic ? 'none' : 'all'});
7577

7678
sliceTop.call(attachFxHandlers, gd, cd);
7779

0 commit comments

Comments
 (0)