Plotly.js: temporarily disable plotly-events

Hi,

Is there any convenient way to temporarily disable a plotly.on event?

Use-case:

I have a dash app which listens to relayout events; however, in a certain part of a custom component, I perform Plotly.relayout to trigger a layout update of the graph, but I do not want that this triggers a relayout event.

Example use case :point_down:

// I tried the once, method, but this didn't do anything
graphDiv._ev.once('plotly_relayout', () => { });
console.log('Relayout should not trigger `relayoutevent`');
Plotly.relayout(graphDiv, head(updateData));

Any help would be greatly appreciated,
Kind regards,
Jonas

Hello @jonvdrdo,

I dont know if there is a way to do this, I have tried event.stopPropogation before.

You could unbind events, but not sure if that would work.