Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable polar rotation drag when dragmode = false #6147

Merged
merged 12 commits into from May 9, 2022

Conversation

jonfunkhouser
Copy link
Contributor

Fixes #5219

draftlogs/6147_fix.md Outdated Show resolved Hide resolved
@archmoj
Copy link
Contributor

archmoj commented Mar 23, 2022

Thanks very much for the PR.
I was expecting that if we start with a polar graph then set the dragmode to false e.g. by typing

Plotly.relayout(gd, 'dragmode', false);

in the console, it disables the interaction.
But the changes appear to have an effect only after the first mouse up.
Could you please investigate that?

@jonfunkhouser
Copy link
Contributor Author

Sorry for the delay. I started investigating this, and the only relayout flag that was being set in response to Plotly.relayout(gd, 'dragmode', false) was modebar. It is now checking if dragmode changed to or from false and triggering a relayout in that case.

@archmoj
Copy link
Contributor

archmoj commented May 6, 2022

It is getting close; but still I can rotate polar_bar-overlay mock right after

Plotly.relayout(gd, 'dragmode', false);

@archmoj archmoj requested a review from alexcjohnson May 6, 2022 15:47
@archmoj
Copy link
Contributor

archmoj commented May 6, 2022

Thanks for the followup.
Some of the tests are failing now:

1) should not respond to drag interactions on radial drag area when dragmode === false
     Test polar interactions: dragmode === false
     Uncaught Error: waitForDragCover: timeout thrown

2) should not responsd to drag interactions on inner radial drag area when dragmode === false
     Test polar interactions: dragmode === false
     Uncaught Error: waitForDragCover: timeout thrown

3) should not responsd to drag interactions on angular drag area when dragmode === false
     Test polar interactions: dragmode === false
     Uncaught Error: waitForDragCover: timeout thrown

src/plots/polar/polar.js Outdated Show resolved Hide resolved
@archmoj
Copy link
Contributor

archmoj commented May 9, 2022

Thanks very much for the PR and follow ups.
💃

@archmoj archmoj merged commit f649320 into plotly:master May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Rotation Drag on Polar when dragmode = false
2 participants