mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
d7ea5b6aa9
# Objective - Intended to resolve https://github.com/bevyengine/bevy/issues/15290. - Fix four duplicate `DragEnd` firing when drag finished. - Fix redundant `DragStart` firing when dragging across pick-able entities. - Fix `Click` coming after `Drop` and obliterating finished drag interactions. Big thanks to B. Reinhart for testing picking in their codebase and identifying these issues early. ## Solution - Fix press & drag state being cleared after the first entity is read from the hover map on pointer release, rather than after all entities are read. This caused only the first hovered entity to receive `Up` and `Click` events. - Fixes `Down` being determined using the `previous_hover_map` rather than `hover_map`, a regression compared to `bevy_mod_picking`. I think this is what was messing up drag events. - Fixes and issue where `PointerEnd` would fire multiple times and `PointerStart` would fire when dragging onto a new entity. - Re-orders events to make them easier to handle. `Out` now fired before `DragLeave` and `Click/Up` now fire before `DragDrop`. - Generally refactors the picking event code to be more clean and sane. ## Testing These changes are currently sporadically tested. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |