1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Hooks for providing and consuming the drag context, plus small event
//! helpers for people wiring `ondrag*` handlers by hand.
use *;
use ZoneRegistry;
use ;
use ;
/// Provide a `DndContext<T>` (and its zone registry) to this component's
/// subtree. Call once, high up (or use the
/// [`crate::core::components::DndProvider`] component).
/// Grab the nearest `DndContext<T>` from context.
///
/// # Panics
/// Panics if no ancestor provided a context for this payload type.
/// Grab the zone registry (mounted drop zones, in order). Provided alongside
/// the context by [`use_dnd_provider`].
/// A stable, auto-generated [`ZoneId`] for this component instance.
/// Client (viewport) coordinates of a drag event as a [`Point`].
/// Element-relative coordinates of a drag event as a [`Point`].