Getting the current state of dragmode

Hi all,

In Python, is there a way to get the current state of “dragmode” in a callback?

What I’m trying to achieve is to block the functionality I built when on hover if the user has the zoom tool activated. I tried getting the state of the figure, but figure['layout']['dragmode'] never changes from its default.


I have also this issue. It seems to be not possible to get the current dragmode, which was last selected by the user. When I check the figure dict I only get the dragmode which was last set by me. Is there a solution for this problem?

I found out by accident. You have to use the relayoutData property of the figure. Here, the last used dragmode ist stored in.