Skip to main content

finish_in_app_drag

Function finish_in_app_drag 

Source
pub fn finish_in_app_drag(
    commands: Commands<'_, '_>,
    ends: MessageReader<'_, '_, DragEndEvent>,
    active: ResMut<'_, ActiveDrag>,
    targets: Query<'_, '_, (Entity, &Transform, Option<&DropAccept>), With<DropTarget>>,
    parents: Query<'_, '_, &ChildOf>,
    scrolls: Query<'_, '_, &ScrollOffset>,
    hovered: Query<'_, '_, Entity, With<DropHovered>>,
    out: MessageWriter<'_, DropAccepted>,
)
Expand description

On the release edge of an active drag, hit-test the drop point and emit DropAccepted at the topmost accepting target - the in-app twin of translate_file_drops_to_payload. Mirrors Qt dropEvent carrying the source + QMimeData / HTML5 drop carrying dataTransfer.