-
Notifications
You must be signed in to change notification settings - Fork 40
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
Drag and drop misses some comments and tests #386
Comments
An example that uses drag&drop is: Double click on a rectangle inserts a |
BTW we should check the status of Bloc-DevTool because may we should add some elements to Bloc by default. |
Thinking about the example I asked myself
S |
- what is the difference between BlDragEvent and BlBaseEvent
BlDragEvent is similar to a "mouse move", it's dispatched many times along
the path of the cursor
the base is the superclass with common API
- why this is the responsibility of the user to mark the event as
consumed. May be in case of reject of drag?
Yes it is that. Maybe it deserves to be a separate flag anyway, if we
think on what it represents. I mean, it may be better to add a "startDrag"
flag to API that explicitely marks if the drag must start, because consume
is not necesarily the same thing. Consuming the event is part of the event
bubbling dispatcher. It is kind of this, in few words: the dispatcher
iterates the tree of elements of the space asking "do you want this event"?
when an element wants it, it marks a consumer:true, to the iteration stops.
…
- why we do not have to mark the BlDragEvent as consumed then.
answered above
Message ID: ***@***.***>
|
I should have sent a capture of the example: Screen.Recording.2024-01-16.at.12.43.55.mov |
It would be nice to check the halos developed by alain and decide which ones we keep but use them :) |
Drag and Drop is being discussed in #649 |
@Enzo-Demeulenaere asked about this topic in the mailing list, and I realized this is missing: We should write class comments in the hierarchy of drag and drop events.
The
BlMouseProcessor>>#handleMouseMove:
method is who takes into account whether the drag start was consumed and acts in consequence.A simple example the shows a key sentence to handle drag and drop:
The text was updated successfully, but these errors were encountered: