Skip to content

Fix right click drag, when mouse up happens after holding cursor still #419

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmrickey
Copy link
Contributor

Foundry, by default, allows you to pan the map with a right click drag. Sequencer also allows this when using Crosshairs. But sometimes right click dragging with a sequence will cancel it, and sometimes it pans and doesn't cancel (as expected).

The reason it sometimes cancels, is if the user stops moving the cursor beforehand, then panning gets turned off. So when the user releases the right mouse button, since this.#isPanning is now false which makes releasing the button cancel the crosshairs instead of ending the panning.

This change makes it so that once a pan is started, it essentially is always a pan, and can't be "reverted" back to a non-panning-click like what happens now.

note: I also tried this with this.#isDrag just above but I didn't see any difference in behavior one way or the other so I opted not to change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant