44// - events are attached as `'plotly_' + name.toLowerCase()`
55// - react props are `'on' + name`
66//
7- // `triggersUpdate` marks events that plotly.js emits *after* mutating the
8- // figure itself (drill-downs, zooms, restyles). For those the wrapper has to
9- // re-read the graph div and fire `onUpdate`. Keeping the flag on the same
10- // record as the name is deliberate: a new drill-down event cannot be added
11- // without deciding whether it updates the figure.
7+ // `triggersUpdate` marks events plotly.js emits *after* changing the figure;
8+ // the wrapper listens to those and fires `onUpdate`. Never set it on a
9+ // cancelable event — that adds a second listener alongside the consumer's,
10+ // and plotly keeps only the last listener's return value, so a consumer's
11+ // `return false` could be discarded. The drill-down clicks rely on
12+ // `plotly_animated` instead.
1213//
1314// The `on*` prop types in `factory.d.ts` are maintained by hand against this list
1415export const events = [
@@ -29,7 +30,7 @@ export const events = [
2930 { name : 'Framework' } ,
3031 { name : 'Hover' } ,
3132 { name : 'HoverAnywhere' } ,
32- { name : 'IcicleClick' , triggersUpdate : true } ,
33+ { name : 'IcicleClick' } ,
3334 { name : 'LegendClick' } ,
3435 { name : 'LegendDoubleClick' } ,
3536 { name : 'Relayout' , triggersUpdate : true } ,
@@ -41,10 +42,10 @@ export const events = [
4142 { name : 'SliderChange' } ,
4243 { name : 'SliderEnd' } ,
4344 { name : 'SliderStart' } ,
44- { name : 'SunburstClick' , triggersUpdate : true } ,
45+ { name : 'SunburstClick' } ,
4546 { name : 'Transitioning' } ,
4647 { name : 'TransitionInterrupted' } ,
47- { name : 'TreemapClick' , triggersUpdate : true } ,
48+ { name : 'TreemapClick' } ,
4849 { name : 'Unhover' } ,
4950 { name : 'WebGlContextLost' } ,
5051] ;
0 commit comments