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

Limit number of simultaneous drags #2726

Open
AppyMike opened this issue Sep 11, 2023 · 1 comment
Open

Limit number of simultaneous drags #2726

AppyMike opened this issue Sep 11, 2023 · 1 comment

Comments

@AppyMike
Copy link

What could be improved

Specifically looking at DragCallbacks and the ability to have it so that only 1 (or n) draggable component(s) can be dragged at one time. Think of a chess board and only being allowed to move 1 piece rather than multiple at the same time.

Why should this be improved

This is currently possible to implement by manually keeping track of the current component being dragged and then returning from void onDragUpdate(DragUpdateEvent event). However, I imagine this is something that is implemented quite a lot and so would be nice for flame to handle it internally, making everything simpler.

Any risks?

None that I can forsee. Defaults should be provided to keep the behaviour as it is now and have the feature as "opt-in".

More information

My original question on SO

@spydon
Copy link
Member

spydon commented Sep 11, 2023

I think we should create a new dispatcher and new mixin for this, because single drags could be combined with scale events too, which isn't possible in a nice way with the multi-drag dispatcher.

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

No branches or pull requests

2 participants