Skip to content

Commit 08371c2

Browse files
committed
short-circuit redraw for spike attribute relayouts
1 parent c036bf7 commit 08371c2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/plot_api/plot_api.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -2124,14 +2124,16 @@ function _relayout(gd, aobj) {
21242124
flags.doticks = flags.dolayoutstyle = true;
21252125
}
21262126
/*
2127-
* hovermode and dragmode don't need any redrawing, since they just
2128-
* affect reaction to user input, everything else, assume full replot.
2127+
* hovermode, dragmode, and spikes don't need any redrawing, since they just
2128+
* affect reaction to user input. Everything else, assume full replot.
21292129
* height, width, autosize get dealt with below. Except for the case of
21302130
* of subplots - scenes - which require scene.updateFx to be called.
21312131
*/
2132-
else if(['hovermode', 'dragmode'].indexOf(ai) !== -1) flags.domodebar = true;
2133-
else if(['hovermode', 'dragmode', 'height',
2134-
'width', 'autosize'].indexOf(ai) === -1) {
2132+
else if(['hovermode', 'dragmode'].indexOf(ai) !== -1 ||
2133+
ai.indexOf('spike') !== -1) {
2134+
flags.domodebar = true;
2135+
}
2136+
else if(['height', 'width', 'autosize'].indexOf(ai) === -1) {
21352137
flags.doplot = true;
21362138
}
21372139

0 commit comments

Comments
 (0)