mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Editor: TODO to lift the wireframe drag-math into core (eng-council)
This commit is contained in:
@@ -282,6 +282,10 @@ function WireframeTree({ tree }: { tree: ViewNode }) {
|
|||||||
[tree, rectOf],
|
[tree, rectOf],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// TODO: the drag-math cluster (edgeOf + dropTargetNode + this zone classifier) is pure
|
||||||
|
// decision logic — given pointer, child rects, orientation and paths it returns a commit or
|
||||||
|
// null — but lives in the component, tested only through happy-dom rect stubs. Lift it into a
|
||||||
|
// core function tested without a DOM when a second draggable surface appears (eng-council).
|
||||||
const resolveDrop = useCallback(
|
const resolveDrop = useCallback(
|
||||||
(x: number, y: number, source: ViewNode, pair: boolean): DropResolution | null => {
|
(x: number, y: number, source: ViewNode, pair: boolean): DropResolution | null => {
|
||||||
const sourcePath = source.path;
|
const sourcePath = source.path;
|
||||||
|
|||||||
Reference in New Issue
Block a user