OptionalbehaviorsOptionalcascadeOptionaldragOptionalexpandOptional: expand the incoming id list before pose lookups. Used for
group expansion (groups have no pose; their leaves do).
Called once at start(). The returned list flows through ctx,
overlay (overlay.draggedIds is the expanded leaves), and op
generation. Returning [] aborts the gesture cleanly.
Default: identity.
OptionalmoveOptionaltransientReserved for transient gestures (no history entry). Move is never transient in practice; accepted for API consistency but ignored.
OptionaltranslateHow to apply a (dx, dy) translation to a pose. Defaults to
translateRectPose, which assumes the pose carries top-level
x/y (the common rect-shaped case). Override for non-rect poses
(e.g. Path → translatePath).
Optional: lookup a world-space pose by id. When supplied alongside
adapter.getChildren, the hook walks each dragged id's descendants and includes them in the live overlay (translated by the same drag delta and added tooverlay.hideIds) so structurally-grouped children visually follow the parent during the gesture. No transform ops are generated for cascaded ids — under local-pose semantics, a child's local pose is unchanged when its parent's local pose moves, so the post-commit scene is already correct.Pair with
worldPoseLookup(adapter, composeRectPose)from@weasel-js/core/transformsfor the standard rect case. Returningnullfor an id (e.g., one removed mid-render) skips it.