The canvas was pan-only; nodes could only be selected from the LayerPanel and never moved without editing X/Y in the property panel. Now: * Document::node_at_doc_point walks the active page top-most-first and returns the topmost node whose aggregate bounds contain the document-space point. Children are tested before parents so a click on a button-rect inside a Frame selects the rect, not the Frame. * Document::translate_selected moves the selected node by (dx, dy) document px. Leaf nodes update bounds.origin directly; container nodes (Group / unbounded Frame) translate every descendant that carries bounds, so dragging a Group moves the whole subtree. * WidgetHostNative tracks a NodeDragState. Press over a node ⇒ select + start node-drag. Cursor-move converts the screen-space delta to document space via the live zoom (no canvas_region offset needed because deltas are translation-invariant) and calls translate_selected. Release clears the drag. * The Hand tool keeps its pure-pan behaviour. Empty-canvas press with any other tool clears the selection + starts a pan-drag, same as before. |
||
|---|---|---|
| .. | ||
| openpencil-app | ||
| openpencil-desktop | ||
| openpencil-shell-core | ||
| openpencil-shell-native | ||
| openpencil-shell-web | ||
| pen-codegen | ||
| pen-core | ||
| pen-engine | ||
| pen-figma | ||
| pen-types | ||
| wasm-libc-shim | ||
| CLAUDE.md | ||