@oh-just-another/state 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/LICENSE +21 -0
- package/README.md +60 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/actions/actionClipboard.d.ts +6 -0
- package/dist/actions/actionClipboard.d.ts.map +1 -0
- package/dist/actions/actionClipboard.js +26 -0
- package/dist/actions/actionClipboard.js.map +1 -0
- package/dist/actions/actionGrouping.d.ts +5 -0
- package/dist/actions/actionGrouping.d.ts.map +1 -0
- package/dist/actions/actionGrouping.js +26 -0
- package/dist/actions/actionGrouping.js.map +1 -0
- package/dist/actions/actionHistory.d.ts +5 -0
- package/dist/actions/actionHistory.d.ts.map +1 -0
- package/dist/actions/actionHistory.js +25 -0
- package/dist/actions/actionHistory.js.map +1 -0
- package/dist/actions/actionKeyboard.d.ts +3 -0
- package/dist/actions/actionKeyboard.d.ts.map +1 -0
- package/dist/actions/actionKeyboard.js +130 -0
- package/dist/actions/actionKeyboard.js.map +1 -0
- package/dist/actions/actionLayout.d.ts +3 -0
- package/dist/actions/actionLayout.d.ts.map +1 -0
- package/dist/actions/actionLayout.js +65 -0
- package/dist/actions/actionLayout.js.map +1 -0
- package/dist/actions/actionMode.d.ts +13 -0
- package/dist/actions/actionMode.d.ts.map +1 -0
- package/dist/actions/actionMode.js +116 -0
- package/dist/actions/actionMode.js.map +1 -0
- package/dist/actions/actionSelection.d.ts +9 -0
- package/dist/actions/actionSelection.d.ts.map +1 -0
- package/dist/actions/actionSelection.js +57 -0
- package/dist/actions/actionSelection.js.map +1 -0
- package/dist/actions/actionView.d.ts +7 -0
- package/dist/actions/actionView.d.ts.map +1 -0
- package/dist/actions/actionView.js +14 -0
- package/dist/actions/actionView.js.map +1 -0
- package/dist/actions/actionZOrder.d.ts +7 -0
- package/dist/actions/actionZOrder.d.ts.map +1 -0
- package/dist/actions/actionZOrder.js +42 -0
- package/dist/actions/actionZOrder.js.map +1 -0
- package/dist/actions/actionZoom.d.ts +8 -0
- package/dist/actions/actionZoom.d.ts.map +1 -0
- package/dist/actions/actionZoom.js +61 -0
- package/dist/actions/actionZoom.js.map +1 -0
- package/dist/actions/index.d.ts +12 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +11 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/registry.d.ts +68 -0
- package/dist/actions/registry.d.ts.map +1 -0
- package/dist/actions/registry.js +300 -0
- package/dist/actions/registry.js.map +1 -0
- package/dist/actions/types.d.ts +103 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actions/types.js +10 -0
- package/dist/actions/types.js.map +1 -0
- package/dist/animation-tick.d.ts +28 -0
- package/dist/animation-tick.d.ts.map +1 -0
- package/dist/animation-tick.js +50 -0
- package/dist/animation-tick.js.map +1 -0
- package/dist/auto-compact.d.ts +27 -0
- package/dist/auto-compact.d.ts.map +1 -0
- package/dist/auto-compact.js +46 -0
- package/dist/auto-compact.js.map +1 -0
- package/dist/auto-layout-scheduler.d.ts +50 -0
- package/dist/auto-layout-scheduler.d.ts.map +1 -0
- package/dist/auto-layout-scheduler.js +94 -0
- package/dist/auto-layout-scheduler.js.map +1 -0
- package/dist/built-in-handlers.d.ts +24 -0
- package/dist/built-in-handlers.d.ts.map +1 -0
- package/dist/built-in-handlers.js +210 -0
- package/dist/built-in-handlers.js.map +1 -0
- package/dist/clipboard.d.ts +51 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clipboard.js +105 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/constants.d.ts +544 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +537 -0
- package/dist/constants.js.map +1 -0
- package/dist/dom-events.d.ts +13 -0
- package/dist/dom-events.d.ts.map +1 -0
- package/dist/dom-events.js +70 -0
- package/dist/dom-events.js.map +1 -0
- package/dist/editor/anchor-points.d.ts +22 -0
- package/dist/editor/anchor-points.d.ts.map +1 -0
- package/dist/editor/anchor-points.js +28 -0
- package/dist/editor/anchor-points.js.map +1 -0
- package/dist/editor/applies/create.d.ts +60 -0
- package/dist/editor/applies/create.d.ts.map +1 -0
- package/dist/editor/applies/create.js +107 -0
- package/dist/editor/applies/create.js.map +1 -0
- package/dist/editor/applies/edge.d.ts +32 -0
- package/dist/editor/applies/edge.d.ts.map +1 -0
- package/dist/editor/applies/edge.js +44 -0
- package/dist/editor/applies/edge.js.map +1 -0
- package/dist/editor/applies/link-move.d.ts +53 -0
- package/dist/editor/applies/link-move.d.ts.map +1 -0
- package/dist/editor/applies/link-move.js +160 -0
- package/dist/editor/applies/link-move.js.map +1 -0
- package/dist/editor/applies/move.d.ts +38 -0
- package/dist/editor/applies/move.d.ts.map +1 -0
- package/dist/editor/applies/move.js +83 -0
- package/dist/editor/applies/move.js.map +1 -0
- package/dist/editor/applies/resize.d.ts +68 -0
- package/dist/editor/applies/resize.d.ts.map +1 -0
- package/dist/editor/applies/resize.js +199 -0
- package/dist/editor/applies/resize.js.map +1 -0
- package/dist/editor/applies/selection.d.ts +34 -0
- package/dist/editor/applies/selection.d.ts.map +1 -0
- package/dist/editor/applies/selection.js +65 -0
- package/dist/editor/applies/selection.js.map +1 -0
- package/dist/editor/applies/snap-grid.d.ts +45 -0
- package/dist/editor/applies/snap-grid.d.ts.map +1 -0
- package/dist/editor/applies/snap-grid.js +90 -0
- package/dist/editor/applies/snap-grid.js.map +1 -0
- package/dist/editor/container-ops.d.ts +74 -0
- package/dist/editor/container-ops.d.ts.map +1 -0
- package/dist/editor/container-ops.js +262 -0
- package/dist/editor/container-ops.js.map +1 -0
- package/dist/editor/event-fanout.d.ts +48 -0
- package/dist/editor/event-fanout.d.ts.map +1 -0
- package/dist/editor/event-fanout.js +53 -0
- package/dist/editor/event-fanout.js.map +1 -0
- package/dist/editor/gesture-tx.d.ts +77 -0
- package/dist/editor/gesture-tx.d.ts.map +1 -0
- package/dist/editor/gesture-tx.js +93 -0
- package/dist/editor/gesture-tx.js.map +1 -0
- package/dist/editor/hit-test.d.ts +178 -0
- package/dist/editor/hit-test.d.ts.map +1 -0
- package/dist/editor/hit-test.js +460 -0
- package/dist/editor/hit-test.js.map +1 -0
- package/dist/editor/long-press.d.ts +34 -0
- package/dist/editor/long-press.d.ts.map +1 -0
- package/dist/editor/long-press.js +58 -0
- package/dist/editor/long-press.js.map +1 -0
- package/dist/editor/pinch.d.ts +37 -0
- package/dist/editor/pinch.d.ts.map +1 -0
- package/dist/editor/pinch.js +90 -0
- package/dist/editor/pinch.js.map +1 -0
- package/dist/editor/pointer-binding.d.ts +18 -0
- package/dist/editor/pointer-binding.d.ts.map +1 -0
- package/dist/editor/pointer-binding.js +1087 -0
- package/dist/editor/pointer-binding.js.map +1 -0
- package/dist/editor/public/annotations.d.ts +54 -0
- package/dist/editor/public/annotations.d.ts.map +1 -0
- package/dist/editor/public/annotations.js +106 -0
- package/dist/editor/public/annotations.js.map +1 -0
- package/dist/editor/public/arrange-group.d.ts +81 -0
- package/dist/editor/public/arrange-group.d.ts.map +1 -0
- package/dist/editor/public/arrange-group.js +193 -0
- package/dist/editor/public/arrange-group.js.map +1 -0
- package/dist/editor/public/brush.d.ts +33 -0
- package/dist/editor/public/brush.d.ts.map +1 -0
- package/dist/editor/public/brush.js +54 -0
- package/dist/editor/public/brush.js.map +1 -0
- package/dist/editor/public/clipboard.d.ts +31 -0
- package/dist/editor/public/clipboard.d.ts.map +1 -0
- package/dist/editor/public/clipboard.js +35 -0
- package/dist/editor/public/clipboard.js.map +1 -0
- package/dist/editor/public/image-insert.d.ts +30 -0
- package/dist/editor/public/image-insert.d.ts.map +1 -0
- package/dist/editor/public/image-insert.js +57 -0
- package/dist/editor/public/image-insert.js.map +1 -0
- package/dist/editor/public/layers.d.ts +56 -0
- package/dist/editor/public/layers.d.ts.map +1 -0
- package/dist/editor/public/layers.js +104 -0
- package/dist/editor/public/layers.js.map +1 -0
- package/dist/editor/public/link.d.ts +25 -0
- package/dist/editor/public/link.d.ts.map +1 -0
- package/dist/editor/public/link.js +74 -0
- package/dist/editor/public/link.js.map +1 -0
- package/dist/editor/public/placement.d.ts +60 -0
- package/dist/editor/public/placement.d.ts.map +1 -0
- package/dist/editor/public/placement.js +111 -0
- package/dist/editor/public/placement.js.map +1 -0
- package/dist/editor/public/selection-ops.d.ts +78 -0
- package/dist/editor/public/selection-ops.d.ts.map +1 -0
- package/dist/editor/public/selection-ops.js +226 -0
- package/dist/editor/public/selection-ops.js.map +1 -0
- package/dist/editor/public/text-edit.d.ts +17 -0
- package/dist/editor/public/text-edit.d.ts.map +1 -0
- package/dist/editor/public/text-edit.js +28 -0
- package/dist/editor/public/text-edit.js.map +1 -0
- package/dist/editor/public/z-order.d.ts +47 -0
- package/dist/editor/public/z-order.d.ts.map +1 -0
- package/dist/editor/public/z-order.js +151 -0
- package/dist/editor/public/z-order.js.map +1 -0
- package/dist/editor/public/zoom-pan.d.ts +44 -0
- package/dist/editor/public/zoom-pan.d.ts.map +1 -0
- package/dist/editor/public/zoom-pan.js +116 -0
- package/dist/editor/public/zoom-pan.js.map +1 -0
- package/dist/editor/render-orchestrator.d.ts +11 -0
- package/dist/editor/render-orchestrator.d.ts.map +1 -0
- package/dist/editor/render-orchestrator.js +473 -0
- package/dist/editor/render-orchestrator.js.map +1 -0
- package/dist/editor/resize-helpers.d.ts +30 -0
- package/dist/editor/resize-helpers.d.ts.map +1 -0
- package/dist/editor/resize-helpers.js +121 -0
- package/dist/editor/resize-helpers.js.map +1 -0
- package/dist/editor/shape-filters.d.ts +11 -0
- package/dist/editor/shape-filters.d.ts.map +1 -0
- package/dist/editor/shape-filters.js +19 -0
- package/dist/editor/shape-filters.js.map +1 -0
- package/dist/editor/shape-traits.d.ts +16 -0
- package/dist/editor/shape-traits.d.ts.map +1 -0
- package/dist/editor/shape-traits.js +29 -0
- package/dist/editor/shape-traits.js.map +1 -0
- package/dist/editor/viewport-helpers.d.ts +24 -0
- package/dist/editor/viewport-helpers.d.ts.map +1 -0
- package/dist/editor/viewport-helpers.js +63 -0
- package/dist/editor/viewport-helpers.js.map +1 -0
- package/dist/editor-events.d.ts +33 -0
- package/dist/editor-events.d.ts.map +1 -0
- package/dist/editor-events.js +2 -0
- package/dist/editor-events.js.map +1 -0
- package/dist/editor.d.ts +1841 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +4803 -0
- package/dist/editor.js.map +1 -0
- package/dist/file-drop.d.ts +99 -0
- package/dist/file-drop.d.ts.map +1 -0
- package/dist/file-drop.js +198 -0
- package/dist/file-drop.js.map +1 -0
- package/dist/frame-helpers.d.ts +30 -0
- package/dist/frame-helpers.d.ts.map +1 -0
- package/dist/frame-helpers.js +105 -0
- package/dist/frame-helpers.js.map +1 -0
- package/dist/group-helpers.d.ts +39 -0
- package/dist/group-helpers.d.ts.map +1 -0
- package/dist/group-helpers.js +116 -0
- package/dist/group-helpers.js.map +1 -0
- package/dist/handle.d.ts +73 -0
- package/dist/handle.d.ts.map +1 -0
- package/dist/handle.js +184 -0
- package/dist/handle.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive.d.ts +21 -0
- package/dist/interactive.d.ts.map +1 -0
- package/dist/interactive.js +11 -0
- package/dist/interactive.js.map +1 -0
- package/dist/link-selection.d.ts +21 -0
- package/dist/link-selection.d.ts.map +1 -0
- package/dist/link-selection.js +37 -0
- package/dist/link-selection.js.map +1 -0
- package/dist/machine.d.ts +322 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/machine.js +568 -0
- package/dist/machine.js.map +1 -0
- package/dist/modes.d.ts +24 -0
- package/dist/modes.d.ts.map +1 -0
- package/dist/modes.js +2 -0
- package/dist/modes.js.map +1 -0
- package/dist/overlay.d.ts +262 -0
- package/dist/overlay.d.ts.map +1 -0
- package/dist/overlay.js +673 -0
- package/dist/overlay.js.map +1 -0
- package/dist/platform.d.ts +70 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +115 -0
- package/dist/platform.js.map +1 -0
- package/dist/selection.d.ts +18 -0
- package/dist/selection.d.ts.map +1 -0
- package/dist/selection.js +31 -0
- package/dist/selection.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-pan.d.ts","sourceRoot":"","sources":["../../../src/editor/public/zoom-pan.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,KAAK,EACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAK3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,EAAE,aAAa,IAAI,KAAG,KAAK,GAAG,IAGpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,KAAK,EACZ,QAAQ,MAAM,EACd,aAAa,IAAI,KAChB,KAAK,GAAG,IASV,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,KAAG,KAAK,GAAG,IAQvD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,KAAK,EACZ,QAAQ,MAAM,EACd,SAAS,MAAM,KACd,KAAK,GAAG,IAiBV,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,EAAE,SAAS,MAAM,KAAG,KAAK,GAAG,IASxE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,KAAK,EACZ,OAAO,MAAM,EACb,QAAQ,MAAM,KACb,KAAK,GAAG,IAIV,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,EACZ,OAAO;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,KAC1D,KAAK,GAAG,IAeV,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { bounds as B } from "@oh-just-another/math";
|
|
2
|
+
import { getElementWorldBounds, panBy as viewportPanBy, resize as viewportResize, zoomAt as viewportZoomAt, } from "@oh-just-another/scene";
|
|
3
|
+
import { MAX_ZOOM, MIN_ZOOM } from "../../constants.js";
|
|
4
|
+
const clampZoom = (z) => Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, z));
|
|
5
|
+
/**
|
|
6
|
+
* Shift the camera by a screen-space delta. Returns the next scene, or
|
|
7
|
+
* `null` for a zero-delta no-op. Viewport state is editor-local —
|
|
8
|
+
* caller does not record this in history.
|
|
9
|
+
*/
|
|
10
|
+
export const computePan = (scene, deltaScreen) => {
|
|
11
|
+
if (deltaScreen.x === 0 && deltaScreen.y === 0)
|
|
12
|
+
return null;
|
|
13
|
+
return { ...scene, viewport: viewportPanBy(scene.viewport, deltaScreen) };
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Multiplicative zoom around a world-space anchor. The anchor stays
|
|
17
|
+
* under the same screen pixel. Result is clamped to `[MIN_ZOOM,
|
|
18
|
+
* MAX_ZOOM]`; a zero-effect call returns `null`.
|
|
19
|
+
*/
|
|
20
|
+
export const computeZoomAt = (scene, factor, anchorWorld) => {
|
|
21
|
+
const currentZoom = scene.viewport.zoom;
|
|
22
|
+
const targetZoom = clampZoom(currentZoom * factor);
|
|
23
|
+
const effectiveFactor = targetZoom / currentZoom;
|
|
24
|
+
if (effectiveFactor === 1)
|
|
25
|
+
return null;
|
|
26
|
+
return {
|
|
27
|
+
...scene,
|
|
28
|
+
viewport: viewportZoomAt(scene.viewport, effectiveFactor, anchorWorld),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Reset zoom to 1.0 around the viewport center — the world point
|
|
33
|
+
* currently under the screen center stays centered, only the scale
|
|
34
|
+
* changes. Returns `null` when already at zoom 1.
|
|
35
|
+
*/
|
|
36
|
+
export const computeResetZoom = (scene) => {
|
|
37
|
+
const vp = scene.viewport;
|
|
38
|
+
if (vp.zoom === 1)
|
|
39
|
+
return null;
|
|
40
|
+
const centerWorld = {
|
|
41
|
+
x: vp.pan.x + vp.size.width / 2 / vp.zoom,
|
|
42
|
+
y: vp.pan.y + vp.size.height / 2 / vp.zoom,
|
|
43
|
+
};
|
|
44
|
+
return { ...scene, viewport: viewportZoomAt(vp, 1 / vp.zoom, centerWorld) };
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Fit the camera to an arbitrary world `bounds` with `padding` screen
|
|
48
|
+
* px on each side. Returns `null` when the viewport or bounds are
|
|
49
|
+
* degenerate. Shared by zoom-to-fit (all content) and
|
|
50
|
+
* zoom-to-selection.
|
|
51
|
+
*/
|
|
52
|
+
export const computeZoomToBounds = (scene, bounds, padding) => {
|
|
53
|
+
const vp = scene.viewport;
|
|
54
|
+
if (vp.size.width <= 0 || vp.size.height <= 0)
|
|
55
|
+
return null;
|
|
56
|
+
if (bounds.width <= 0 || bounds.height <= 0)
|
|
57
|
+
return null;
|
|
58
|
+
const availW = vp.size.width - padding * 2;
|
|
59
|
+
const availH = vp.size.height - padding * 2;
|
|
60
|
+
if (availW <= 0 || availH <= 0)
|
|
61
|
+
return null;
|
|
62
|
+
const zoom = clampZoom(Math.min(availW / bounds.width, availH / bounds.height));
|
|
63
|
+
const centerWorld = {
|
|
64
|
+
x: bounds.x + bounds.width / 2,
|
|
65
|
+
y: bounds.y + bounds.height / 2,
|
|
66
|
+
};
|
|
67
|
+
const pan = {
|
|
68
|
+
x: centerWorld.x - vp.size.width / 2 / zoom,
|
|
69
|
+
y: centerWorld.y - vp.size.height / 2 / zoom,
|
|
70
|
+
};
|
|
71
|
+
return { ...scene, viewport: { ...vp, zoom, pan } };
|
|
72
|
+
};
|
|
73
|
+
export const computeZoomToFit = (scene, padding) => {
|
|
74
|
+
if (scene.elements.size === 0)
|
|
75
|
+
return null;
|
|
76
|
+
let combined = null;
|
|
77
|
+
for (const s of scene.elements.values()) {
|
|
78
|
+
const b = getElementWorldBounds(s);
|
|
79
|
+
combined = combined ? B.union(combined, b) : b;
|
|
80
|
+
}
|
|
81
|
+
if (!combined)
|
|
82
|
+
return null;
|
|
83
|
+
return computeZoomToBounds(scene, combined, padding);
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Update the camera's screen-pixel size. Returns `null` when size is
|
|
87
|
+
* unchanged.
|
|
88
|
+
*/
|
|
89
|
+
export const computeViewportResize = (scene, width, height) => {
|
|
90
|
+
const vp = scene.viewport;
|
|
91
|
+
if (vp.size.width === width && vp.size.height === height)
|
|
92
|
+
return null;
|
|
93
|
+
return { ...scene, viewport: viewportResize(vp, width, height) };
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Merge a partial grid update (`size` and/or `style`). Returns `null`
|
|
97
|
+
* when nothing actually changed. Grid settings are view preferences —
|
|
98
|
+
* caller doesn't touch history.
|
|
99
|
+
*/
|
|
100
|
+
export const computeSetGrid = (scene, patch) => {
|
|
101
|
+
const vp = scene.viewport;
|
|
102
|
+
const nextSize = patch.size ?? vp.gridSize;
|
|
103
|
+
const nextStyle = patch.style ?? vp.gridStyle;
|
|
104
|
+
const nextSnap = patch.snap ?? vp.snapToGrid;
|
|
105
|
+
if (nextSize === vp.gridSize && nextStyle === vp.gridStyle && nextSnap === vp.snapToGrid) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
const nextViewport = {
|
|
109
|
+
...vp,
|
|
110
|
+
...(nextSize === undefined ? {} : { gridSize: nextSize }),
|
|
111
|
+
...(nextStyle === undefined ? {} : { gridStyle: nextStyle }),
|
|
112
|
+
...(nextSnap === undefined ? {} : { snapToGrid: nextSnap }),
|
|
113
|
+
};
|
|
114
|
+
return { ...scene, viewport: nextViewport };
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=zoom-pan.js.map
|
|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,EAAE,CAAC;QACzD,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;QAC5D,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;KAC5D,CAAC;IACF,OAAO,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Editor } from "../editor.js";
|
|
2
|
+
/**
|
|
3
|
+
* Render orchestrator: background grid pass, tile-cache vs full renderScene
|
|
4
|
+
* path, and the overlay options builder (drawing / lasso preview, edge
|
|
5
|
+
* preview, hovered ports, group handles, container drop zone, brush stroke,
|
|
6
|
+
* edge endpoint drag, peer cursors, annotations). Typed against the full
|
|
7
|
+
* `Editor` class via a type-only import erased at runtime; the single call
|
|
8
|
+
* site is editor.ts's own private `render()` wrapper.
|
|
9
|
+
*/
|
|
10
|
+
export declare const renderEditor: (editor: Editor) => void;
|
|
11
|
+
//# sourceMappingURL=render-orchestrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-orchestrator.d.ts","sourceRoot":"","sources":["../../src/editor/render-orchestrator.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAkB3C;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,KAAG,IAwc7C,CAAC"}
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import { getLink, getLinkPath, getLinkCurvePoints, getLinkWaypointMidpoints, getElement, getElementWorldBounds, getElementOutline, getWorldToScreen, getDropZonesWorld, strokeOutsideExtent, isImage, } from "@oh-just-another/scene";
|
|
2
|
+
import { DEFAULT_LOD, renderLinks, renderGrid, renderScene } from "@oh-just-another/renderer-core";
|
|
3
|
+
import { renderOverlay, paintElementSelectionHalo, } from "../overlay.js";
|
|
4
|
+
import { anchorOverlayPoints } from "./anchor-points.js";
|
|
5
|
+
import { hitZoneVisibility } from "./hit-test.js";
|
|
6
|
+
import { buildElementForCreate, buildEdgePreviewLink } from "./applies/create.js";
|
|
7
|
+
import { ANCHOR_DOT_ACTIVE_RADIUS, ANCHOR_DOT_RADIUS, ANCHOR_DOT_HOVER_GROW_RADIUS, ANCHOR_DOT_HOVER_MAX_RADIUS, DEFAULT_SNAP_THRESHOLD, GHOST_PREVIEW_OPACITY, ISOLATION_DIM_OPACITY, LARGE_SCENE_HIT_THRESHOLD, LINK_START_ANCHOR_OUTSET, LINK_ATTACH_ANCHOR_OUTSET, } from "../constants.js";
|
|
8
|
+
/**
|
|
9
|
+
* Stable throwaway id for the transient shape-draw preview element. Never
|
|
10
|
+
* enters the scene / history — it exists only for the duration of a single
|
|
11
|
+
* overlay paint, so any constant id is fine.
|
|
12
|
+
*/
|
|
13
|
+
const DRAW_PREVIEW_ELEMENT_ID = "__draw-preview__";
|
|
14
|
+
/** Throwaway id for the live draw-edge connector preview link. */
|
|
15
|
+
const DRAW_PREVIEW_LINK_ID = "__draw-preview-link__";
|
|
16
|
+
/** Index-access helper: throws on out-of-range instead of returning `undefined`. */
|
|
17
|
+
const req = (v) => {
|
|
18
|
+
if (v === undefined)
|
|
19
|
+
throw new Error("packages/state: index out of range");
|
|
20
|
+
return v;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Render orchestrator: background grid pass, tile-cache vs full renderScene
|
|
24
|
+
* path, and the overlay options builder (drawing / lasso preview, edge
|
|
25
|
+
* preview, hovered ports, group handles, container drop zone, brush stroke,
|
|
26
|
+
* edge endpoint drag, peer cursors, annotations). Typed against the full
|
|
27
|
+
* `Editor` class via a type-only import erased at runtime; the single call
|
|
28
|
+
* site is editor.ts's own private `render()` wrapper.
|
|
29
|
+
*/
|
|
30
|
+
export const renderEditor = (editor) => {
|
|
31
|
+
// Background layer (grid + selection halo), when the host gave us a
|
|
32
|
+
// dedicated target. The grid clears it each frame; the contour selection
|
|
33
|
+
// halo is then painted on top of the grid but UNDER the shapes (main
|
|
34
|
+
// layer), so it peeks out from behind each selected element. Its own clean
|
|
35
|
+
// Canvas2D layer avoids dirty-rect flicker and paint-state bleed into the
|
|
36
|
+
// shape pass. Without a background layer the grid lives on mainTarget
|
|
37
|
+
// before shapes are drawn, so renderScene's clear takes care of it.
|
|
38
|
+
if (editor.backgroundTarget) {
|
|
39
|
+
// Grid pass also clears the background layer each frame. When the grid is
|
|
40
|
+
// toggled off, still clear it so no stale grid lingers under the halos.
|
|
41
|
+
if (editor.gridVisible)
|
|
42
|
+
renderGrid(editor._scene, editor.backgroundTarget);
|
|
43
|
+
else
|
|
44
|
+
editor.backgroundTarget.clear();
|
|
45
|
+
const halos = [];
|
|
46
|
+
for (const id of editor._selection) {
|
|
47
|
+
const shape = getElement(editor._scene, id);
|
|
48
|
+
if (!shape)
|
|
49
|
+
continue;
|
|
50
|
+
const style = shape.style ?? {};
|
|
51
|
+
halos.push({
|
|
52
|
+
loops: getElementOutline(editor._scene, shape),
|
|
53
|
+
outsetWorld: strokeOutsideExtent(style),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (halos.length > 0) {
|
|
57
|
+
paintElementSelectionHalo(editor.backgroundTarget, getWorldToScreen(editor._scene.viewport), halos, editor._scene.viewport.zoom || 1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// World-space viewport rect — used by `renderScene` to skip off-screen
|
|
61
|
+
// shapes. Computed by mapping the screen viewport corners through the
|
|
62
|
+
// inverse projection. Slightly inflated so geometry near the edge
|
|
63
|
+
// does not flicker during pan.
|
|
64
|
+
const viewportWorld = editor.computeViewportWorld();
|
|
65
|
+
const dirtyWorld = editor.computeDirtyWorld();
|
|
66
|
+
const dimElements = editor._enteredGroup
|
|
67
|
+
? editor.computeDimElements(editor._enteredGroup)
|
|
68
|
+
: undefined;
|
|
69
|
+
const hideElements = editor.computeHiddenElements();
|
|
70
|
+
if (editor.tileComposeFn && viewportWorld) {
|
|
71
|
+
// Tile-cache path: clear main once, then composite cached tiles. Dim /
|
|
72
|
+
// hide sets aren't honoured by the tile cache (would require a separate
|
|
73
|
+
// pass); this opt-in path is intended for very-large static scenes where
|
|
74
|
+
// neither typically applies.
|
|
75
|
+
editor.mainTarget.clear();
|
|
76
|
+
editor.tileComposeFn(editor._scene, editor.mainTarget, {
|
|
77
|
+
viewport: viewportWorld,
|
|
78
|
+
changedElements: editor.tileDirtyElements,
|
|
79
|
+
zoomBucket: editor._scene.viewport.zoom > 0
|
|
80
|
+
? 2 ** Math.round(Math.log2(editor._scene.viewport.zoom))
|
|
81
|
+
: 1,
|
|
82
|
+
});
|
|
83
|
+
editor.tileDirtyElements = new Map();
|
|
84
|
+
renderLinks(editor._scene, editor.mainTarget, { viewportWorld });
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
// For very large scenes share the same SpatialGrid the hit-test path
|
|
88
|
+
// already maintains — `renderScene` uses it to skip the per-shape AABB
|
|
89
|
+
// cull on shapes outside the viewport.
|
|
90
|
+
const sharedIndex = editor._scene.elements.size >= LARGE_SCENE_HIT_THRESHOLD ? editor.ensureSpatialIndex() : null;
|
|
91
|
+
renderScene(editor._scene, editor.mainTarget, {
|
|
92
|
+
...(viewportWorld ? { viewport: viewportWorld } : {}),
|
|
93
|
+
...(dirtyWorld ? { dirtyWorld } : {}),
|
|
94
|
+
boundsCache: editor.boundsCache,
|
|
95
|
+
lod: DEFAULT_LOD,
|
|
96
|
+
...(dimElements ? { dimElements, dimOpacity: ISOLATION_DIM_OPACITY } : {}),
|
|
97
|
+
...(hideElements ? { hideElements } : {}),
|
|
98
|
+
...(sharedIndex ? { spatialIndex: sharedIndex } : {}),
|
|
99
|
+
});
|
|
100
|
+
renderLinks(editor._scene, editor.mainTarget, {
|
|
101
|
+
...(viewportWorld ? { viewportWorld } : {}),
|
|
102
|
+
...(dirtyWorld ? { dirtyWorld } : {}),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
editor.lastRenderedScene = editor._scene;
|
|
106
|
+
editor.lastRenderedEnteredGroup = editor._enteredGroup;
|
|
107
|
+
const overlayOpts = {};
|
|
108
|
+
// Throwaway scene holding the click-create ghost connector — rendered
|
|
109
|
+
// through the real link renderer (faded) AFTER the overlay, so the ghost
|
|
110
|
+
// connector matches the link that will be created (routing / arrowhead /
|
|
111
|
+
// style), not a dashed preview line. Set in the start-dot hover branch.
|
|
112
|
+
let ghostScene = null;
|
|
113
|
+
// The lasso (select-mode rubber-band) keeps the plain dashed rect. A shape
|
|
114
|
+
// draw (draw-rect / draw-ellipse) shows a preview of the would-be element
|
|
115
|
+
// rendered through its real renderer — the user sees the actual shape +
|
|
116
|
+
// default style they'll get on release, not just a dashed box. Both
|
|
117
|
+
// gestures can't run at once, so one slot is set.
|
|
118
|
+
if (editor.lassoPreview) {
|
|
119
|
+
overlayOpts.drawingPreview = editor.lassoPreview;
|
|
120
|
+
}
|
|
121
|
+
else if (editor.drawingPreview) {
|
|
122
|
+
const kind = editor.mode === "draw-rect" ? "rect" : editor.mode === "draw-ellipse" ? "ellipse" : null;
|
|
123
|
+
if (kind) {
|
|
124
|
+
overlayOpts.drawingPreviewElement = buildElementForCreate(editor._scene, kind, editor.drawingPreview, DRAW_PREVIEW_ELEMENT_ID, editor._activeLayerId, () => "");
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
overlayOpts.drawingPreview = editor.drawingPreview;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Draw-edge connector preview: render the would-be link through the real
|
|
131
|
+
// link renderer (solid, default arrowheads, full colour) so the dragged
|
|
132
|
+
// preview looks exactly like the link that'll be created — same default
|
|
133
|
+
// object as commit (`buildLinkForCreate`), not a faded/dashed stand-in.
|
|
134
|
+
let edgePreviewScene = null;
|
|
135
|
+
if (editor.edgePreview) {
|
|
136
|
+
const previewLink = buildEdgePreviewLink(editor._scene, editor.edgePreview, DRAW_PREVIEW_LINK_ID, editor._activeLayerId);
|
|
137
|
+
edgePreviewScene = {
|
|
138
|
+
...editor._scene,
|
|
139
|
+
links: new Map([[DRAW_PREVIEW_LINK_ID, previewLink]]),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// Connection anchors. Two roles: link-start (on selection) and link-attach
|
|
143
|
+
// (on hover/proximity). During a drag started FROM a start-anchor (select
|
|
144
|
+
// mode, no tool switch) BOTH are shown: the source keeps its start dots
|
|
145
|
+
// while the target shows its attach dots under the cursor.
|
|
146
|
+
if (editor.mode !== "brush" && editor.mode !== "hand") {
|
|
147
|
+
const zoom = editor._scene.viewport.zoom || 1;
|
|
148
|
+
// Build one overlay port-set for a shape. The free outline-attach point
|
|
149
|
+
// (`outlinePoint`, link-attach only) is appended un-offset — it is the
|
|
150
|
+
// real landing point. `activeAnchorName` highlights the snap target if it
|
|
151
|
+
// is one of the named dots.
|
|
152
|
+
const buildPortSet = (shapeId, role, activeAnchorName, outlinePoint) => {
|
|
153
|
+
const shape = getElement(editor._scene, shapeId);
|
|
154
|
+
if (!shape)
|
|
155
|
+
return null;
|
|
156
|
+
const outsetPx = role === "link-start" ? LINK_START_ANCHOR_OUTSET : LINK_ATTACH_ANCHOR_OUTSET;
|
|
157
|
+
const { names, worldPoints: anchorPts } = anchorOverlayPoints(shape, outsetPx / zoom);
|
|
158
|
+
const worldPoints = [...anchorPts];
|
|
159
|
+
const namedActive = activeAnchorName !== null ? names.indexOf(activeAnchorName) : -1;
|
|
160
|
+
if (role === "link-attach" && outlinePoint)
|
|
161
|
+
worldPoints.push(outlinePoint);
|
|
162
|
+
const activeIndex = namedActive >= 0
|
|
163
|
+
? namedActive
|
|
164
|
+
: role === "link-attach" && outlinePoint
|
|
165
|
+
? worldPoints.length - 1
|
|
166
|
+
: -1;
|
|
167
|
+
return {
|
|
168
|
+
worldPoints,
|
|
169
|
+
...(activeIndex >= 0 ? { activeIndex } : {}),
|
|
170
|
+
role,
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
const portSets = [];
|
|
174
|
+
if (editor.linkDragFromAnchor) {
|
|
175
|
+
// Drag from a start-anchor: keep the source's start dots visible…
|
|
176
|
+
const startSet = buildPortSet(editor.linkDragFromAnchor.fromElement, "link-start", null);
|
|
177
|
+
if (startSet)
|
|
178
|
+
portSets.push(startSet);
|
|
179
|
+
// …and show the target's attach dots under the cursor.
|
|
180
|
+
if (editor.hoveredLinkTarget) {
|
|
181
|
+
const t = editor.hoveredLinkTarget;
|
|
182
|
+
const attachSet = buildPortSet(t.elementId, "link-attach", t.activeAnchor, t.outlinePoint);
|
|
183
|
+
if (attachSet)
|
|
184
|
+
portSets.push(attachSet);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else if (editor.hoveredLinkTarget) {
|
|
188
|
+
// Proximity snap while a link is drawn with the draw-edge tool.
|
|
189
|
+
const t = editor.hoveredLinkTarget;
|
|
190
|
+
const attachSet = buildPortSet(t.elementId, "link-attach", t.activeAnchor, t.outlinePoint);
|
|
191
|
+
if (attachSet)
|
|
192
|
+
portSets.push(attachSet);
|
|
193
|
+
}
|
|
194
|
+
else if (!editor.panGesture &&
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- `pinch` is unset during the constructor's first render; type says non-null but runtime can be undefined
|
|
196
|
+
!editor.pinch?.isActive() &&
|
|
197
|
+
!editor.gestureTx && // hide only during a real drag (tx opens on first move-patch), not on a bare press
|
|
198
|
+
!editor.edgePreview && // don't show start-anchors if we are already drawing a link
|
|
199
|
+
!editor.linkEndpointDrag // or dragging an existing endpoint
|
|
200
|
+
) {
|
|
201
|
+
// At rest — show link-start anchors for the single selected element, and
|
|
202
|
+
// only while the cursor is over it or within reach of its dots: dots sit
|
|
203
|
+
// just OUTSIDE the edges, so the hover zone is the element bounds
|
|
204
|
+
// expanded by the outset + dot grab radius. Keeps them visible as the
|
|
205
|
+
// cursor travels out to a dot. Dots are NOT shown on unselected
|
|
206
|
+
// elements — select first, then connect. The dot nearest the cursor
|
|
207
|
+
// grows (`ANCHOR_DOT_HOVER_GROW_RADIUS`).
|
|
208
|
+
const cursor = editor.hoverCursorWorld;
|
|
209
|
+
if (editor._selection.size === 1 && cursor) {
|
|
210
|
+
const id = req([...editor._selection][0]);
|
|
211
|
+
const shape = getElement(editor._scene, id);
|
|
212
|
+
if (shape) {
|
|
213
|
+
const b = getElementWorldBounds(shape);
|
|
214
|
+
const pad = (LINK_START_ANCHOR_OUTSET + ANCHOR_DOT_ACTIVE_RADIUS + editor.anchorStartHitSlop) /
|
|
215
|
+
zoom;
|
|
216
|
+
const near = cursor.x >= b.x - pad &&
|
|
217
|
+
cursor.x <= b.x + b.width + pad &&
|
|
218
|
+
cursor.y >= b.y - pad &&
|
|
219
|
+
cursor.y <= b.y + b.height + pad;
|
|
220
|
+
if (near) {
|
|
221
|
+
const set = buildPortSet(id, "link-start", null);
|
|
222
|
+
if (set) {
|
|
223
|
+
const r = ANCHOR_DOT_HOVER_GROW_RADIUS / zoom;
|
|
224
|
+
let bestI = -1;
|
|
225
|
+
let bestD2 = r * r;
|
|
226
|
+
set.worldPoints.forEach((p, i) => {
|
|
227
|
+
const dx = p.x - cursor.x;
|
|
228
|
+
const dy = p.y - cursor.y;
|
|
229
|
+
const d2 = dx * dx + dy * dy;
|
|
230
|
+
if (d2 <= bestD2) {
|
|
231
|
+
bestD2 = d2;
|
|
232
|
+
bestI = i;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
if (bestI >= 0) {
|
|
236
|
+
// Smooth proximity grow: scale the nearest dot from its resting
|
|
237
|
+
// radius up to the max as the cursor closes in (t = 1 at the
|
|
238
|
+
// dot, 0 at the edge of the grow radius).
|
|
239
|
+
const t = r > 0 ? Math.max(0, 1 - Math.sqrt(bestD2) / r) : 0;
|
|
240
|
+
const activeRadius = ANCHOR_DOT_RADIUS + (ANCHOR_DOT_HOVER_MAX_RADIUS - ANCHOR_DOT_RADIUS) * t;
|
|
241
|
+
portSets.push({ ...set, activeIndex: bestI, activeRadius });
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
portSets.push(set);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
// Hovering ON a dot (within the click radius) → ghost preview of
|
|
248
|
+
// what a click would create (copy element + connector).
|
|
249
|
+
const { names, worldPoints } = anchorOverlayPoints(shape, LINK_START_ANCHOR_OUTSET / zoom);
|
|
250
|
+
const clickR2 = (editor.anchorClickRadius / zoom) ** 2;
|
|
251
|
+
let hoveredName = null;
|
|
252
|
+
for (let i = 0; i < worldPoints.length; i++) {
|
|
253
|
+
const p = req(worldPoints[i]);
|
|
254
|
+
if ((p.x - cursor.x) ** 2 + (p.y - cursor.y) ** 2 <= clickR2) {
|
|
255
|
+
hoveredName = req(names[i]);
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (hoveredName) {
|
|
260
|
+
const preview = editor.previewClickCreate(id, hoveredName);
|
|
261
|
+
if (preview) {
|
|
262
|
+
overlayOpts.ghostElement = preview.bounds;
|
|
263
|
+
overlayOpts.ghostElementShape = preview.element;
|
|
264
|
+
ghostScene = preview.ghostScene;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if (portSets.length === 1)
|
|
272
|
+
overlayOpts.ports = req(portSets[0]);
|
|
273
|
+
else if (portSets.length > 1)
|
|
274
|
+
overlayOpts.ports = portSets;
|
|
275
|
+
// Float-attach feedback: when the endpoint will attach to the whole
|
|
276
|
+
// element (not a specific dot), highlight that element so the user knows
|
|
277
|
+
// it'll float vs fix to a point.
|
|
278
|
+
const hov = editor.hoveredLinkTarget;
|
|
279
|
+
if (hov?.mode === "element") {
|
|
280
|
+
const tshape = getElement(editor._scene, hov.elementId);
|
|
281
|
+
if (tshape)
|
|
282
|
+
overlayOpts.linkAttachHighlight = getElementWorldBounds(tshape);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
// Group-handle overlay: a multi-object selection (elements + links) OR a
|
|
286
|
+
// single group-typed shape. A lone link keeps its endpoint handles, not a
|
|
287
|
+
// resize box. Aspect-locked groups flag the overlay for corner-only handles.
|
|
288
|
+
if (editor._selection.size + editor._selectedLinks.size > 1 ||
|
|
289
|
+
editor.selectionIsAspectLocked()) {
|
|
290
|
+
const combined = editor.combinedSelectionBounds();
|
|
291
|
+
if (combined)
|
|
292
|
+
overlayOpts.groupBounds = combined;
|
|
293
|
+
if (editor.selectionIsAspectLocked())
|
|
294
|
+
overlayOpts.groupAspectLocked = true;
|
|
295
|
+
}
|
|
296
|
+
if (editor.containerHover) {
|
|
297
|
+
overlayOpts.containerDropZone = editor.containerHover.dropZone;
|
|
298
|
+
}
|
|
299
|
+
if (editor.brushStroke) {
|
|
300
|
+
overlayOpts.brushPreview = {
|
|
301
|
+
origin: editor.brushStroke.origin,
|
|
302
|
+
points: editor.brushStroke.points,
|
|
303
|
+
fill: "#222",
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
// Persistent halo around EVERY selected link (multi-select). Curve-aware
|
|
307
|
+
// so the halo follows the drawn path, matching the hover highlight.
|
|
308
|
+
if (editor._selectedLinks.size > 0) {
|
|
309
|
+
const halos = [];
|
|
310
|
+
for (const id of editor._selectedLinks) {
|
|
311
|
+
const edge = getLink(editor._scene, id);
|
|
312
|
+
if (!edge)
|
|
313
|
+
continue;
|
|
314
|
+
const hpath = getLinkCurvePoints(editor._scene, edge);
|
|
315
|
+
if (hpath && hpath.length >= 2) {
|
|
316
|
+
halos.push({ path: hpath, width: edge.style.strokeWidth ?? 1 });
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (halos.length > 0)
|
|
320
|
+
overlayOpts.selectedLinkPaths = halos;
|
|
321
|
+
}
|
|
322
|
+
// Endpoint / bend handles only for the SOLE selected link (no elements);
|
|
323
|
+
// a multi/mixed selection hides them to stay uncluttered.
|
|
324
|
+
const soleSelectedLink = editor.selectedLink;
|
|
325
|
+
if (soleSelectedLink) {
|
|
326
|
+
const edge = getLink(editor._scene, soleSelectedLink);
|
|
327
|
+
if (edge) {
|
|
328
|
+
const path = getLinkPath(editor._scene, edge);
|
|
329
|
+
if (path && path.length >= 2) {
|
|
330
|
+
// During an endpoint-rebind drag the dragged end is re-pointed live in
|
|
331
|
+
// the scene (the whole link follows the cursor), so `path` already
|
|
332
|
+
// reflects the cursor position — handles ride along with it.
|
|
333
|
+
const from = req(path[0]);
|
|
334
|
+
const to = req(path[path.length - 1]);
|
|
335
|
+
// Bend-point handles: existing waypoints (solid) + segment-midpoint
|
|
336
|
+
// "add" handles along the logical [from, ...waypoints, to] chain.
|
|
337
|
+
// Midpoints are hidden during an active waypoint drag to declutter.
|
|
338
|
+
// ELBOW (orthogonal) links don't expose free bend handles — their
|
|
339
|
+
// points are router output, not user-placed (segment-drag editing is
|
|
340
|
+
// a separate mechanic). Only straight / bezier show free waypoints.
|
|
341
|
+
const isElbow = (edge.routing ?? "straight") === "orthogonal";
|
|
342
|
+
if (isElbow) {
|
|
343
|
+
// Segment handles on interior segments of the routed chain
|
|
344
|
+
// (k in 1..len-3; the two terminal segments touch from/to and
|
|
345
|
+
// can't be slid). Hidden during an active segment / endpoint drag.
|
|
346
|
+
const midpoints = [];
|
|
347
|
+
if (!editor.linkSegmentDrag && !editor.linkEndpointDrag) {
|
|
348
|
+
// Straight elbow → one handle on its single segment (grab to
|
|
349
|
+
// bend). Routed elbow → handles on interior segments.
|
|
350
|
+
const segs = path.length === 2
|
|
351
|
+
? [0]
|
|
352
|
+
: Array.from({ length: Math.max(0, path.length - 3) }, (_, i) => i + 1);
|
|
353
|
+
for (const k of segs) {
|
|
354
|
+
const a = req(path[k]);
|
|
355
|
+
const b = req(path[k + 1]);
|
|
356
|
+
midpoints.push({ x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 });
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
overlayOpts.edgeSelection = { from, to, midpoints };
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
const waypoints = [...(edge.waypoints ?? [])];
|
|
363
|
+
// "Add waypoint" handles sit at the VISUAL middle of each span — on
|
|
364
|
+
// the drawn arc for bezier (t=0.5 of the span's cubic), on the chord
|
|
365
|
+
// for straight. The raw chord midpoint would put bezier handles off
|
|
366
|
+
// the curve.
|
|
367
|
+
const midpoints = editor.linkWaypointDrag
|
|
368
|
+
? []
|
|
369
|
+
: (getLinkWaypointMidpoints(editor._scene, edge) ?? []);
|
|
370
|
+
overlayOpts.edgeSelection = { from, to, waypoints, midpoints };
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
if (editor._peerCursors.length > 0)
|
|
376
|
+
overlayOpts.peerCursors = editor._peerCursors;
|
|
377
|
+
if (editor._peerSelections.length > 0)
|
|
378
|
+
overlayOpts.peerSelections = editor._peerSelections;
|
|
379
|
+
if (editor._scene.annotations.size > 0) {
|
|
380
|
+
overlayOpts.annotations = [...editor._scene.annotations.values()];
|
|
381
|
+
overlayOpts.selectedAnnotation = editor._selectedAnnotation;
|
|
382
|
+
}
|
|
383
|
+
// "Play" badge on paused animated (GIF) shapes — auto-stopped or held under
|
|
384
|
+
// prefers-reduced-motion. Signals a click resumes them.
|
|
385
|
+
const gifBadges = [];
|
|
386
|
+
for (const shape of editor._scene.elements.values()) {
|
|
387
|
+
if (isImage(shape) && shape.animationKind && editor.isPlaybackPaused(shape.id)) {
|
|
388
|
+
gifBadges.push(getElementWorldBounds(shape));
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
if (gifBadges.length > 0)
|
|
392
|
+
overlayOpts.gifBadges = gifBadges;
|
|
393
|
+
// In-canvas text editing: caret + selection highlight for the shape
|
|
394
|
+
// under edit (null when not editing).
|
|
395
|
+
const editingText = editor.editingTextOverlay();
|
|
396
|
+
if (editingText)
|
|
397
|
+
overlayOpts.editingText = editingText;
|
|
398
|
+
if (editor.debugHitZones) {
|
|
399
|
+
overlayOpts.debugHitZones = true;
|
|
400
|
+
// One decision point for which hit-zone categories are actionable now
|
|
401
|
+
// (see `hitZoneVisibility`): while a link endpoint is being placed only
|
|
402
|
+
// the link-attach drop-zones are live; at rest the resize / body / handle
|
|
403
|
+
// / start-dot zones are. The overlay paints only the visible ones.
|
|
404
|
+
const linkDragActive = editor.linkDragFromAnchor !== null ||
|
|
405
|
+
editor.edgePreview !== null ||
|
|
406
|
+
editor.linkEndpointDrag !== null;
|
|
407
|
+
// An element move is in flight: position snapshot taken (groupMoveOrigin)
|
|
408
|
+
// AND a real drag transaction opened (gestureTx opens only past the drag
|
|
409
|
+
// threshold, so a bare press doesn't count). Resize uses groupResizeOrigin
|
|
410
|
+
// instead, so this stays move-only.
|
|
411
|
+
const elementDragActive = editor.groupMoveOrigin !== null && editor.gestureTx !== null;
|
|
412
|
+
const visibility = hitZoneVisibility({ linkDragActive, elementDragActive });
|
|
413
|
+
overlayOpts.debugHitZoneVisibility = visibility;
|
|
414
|
+
if (visibility.attachDropZones) {
|
|
415
|
+
// Link-attach drop-zones (anchor catchments + edge bands + floating body)
|
|
416
|
+
// the snap engine resolves against, for every element except the drag
|
|
417
|
+
// source — shows where a drop lands ON a point vs ON an edge vs the body.
|
|
418
|
+
const srcId = editor.linkDragFromAnchor?.fromElement;
|
|
419
|
+
const anchors = [];
|
|
420
|
+
const outlineLoops = [];
|
|
421
|
+
for (const shape of editor._scene.elements.values()) {
|
|
422
|
+
if (shape.id === srcId)
|
|
423
|
+
continue;
|
|
424
|
+
anchors.push(...anchorOverlayPoints(shape, 0).worldPoints);
|
|
425
|
+
for (const loop of getElementOutline(editor._scene, shape))
|
|
426
|
+
outlineLoops.push(loop);
|
|
427
|
+
}
|
|
428
|
+
overlayOpts.debugAttachZones = {
|
|
429
|
+
anchors,
|
|
430
|
+
outlineLoops,
|
|
431
|
+
thresholdWorld: DEFAULT_SNAP_THRESHOLD,
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
if (visibility.containerDropZones) {
|
|
435
|
+
// Element drop-zones for ALL frames + containers at once. Frames use
|
|
436
|
+
// centroid-in-body (full world bounds); containers use
|
|
437
|
+
// cursor-in-drop-zone (resolved zone). The dragged elements themselves
|
|
438
|
+
// are skipped — you can't drop into self.
|
|
439
|
+
const dragged = editor.groupMoveOrigin;
|
|
440
|
+
const frames = [];
|
|
441
|
+
const containers = [];
|
|
442
|
+
for (const shape of editor._scene.elements.values()) {
|
|
443
|
+
if (dragged?.has(shape.id))
|
|
444
|
+
continue;
|
|
445
|
+
if (shape.type === "frame") {
|
|
446
|
+
frames.push(getElementWorldBounds(shape));
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
// All drop-zones (every lane of a multi-lane container), not just the
|
|
450
|
+
// single attach zone — so a swim-lane shows a region per lane.
|
|
451
|
+
containers.push(...getDropZonesWorld(shape));
|
|
452
|
+
}
|
|
453
|
+
overlayOpts.debugContainerZones = { frames, containers };
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
renderOverlay(editor._scene, editor._selection, editor.overlayTarget, overlayOpts);
|
|
457
|
+
// Ghost connector (click-create hover) — drawn through the REAL link
|
|
458
|
+
// renderer onto the overlay, faded, AFTER the overlay chrome so it sits on
|
|
459
|
+
// top of the ghost element (matches scene z-order: links over shapes). Uses
|
|
460
|
+
// the would-be link's actual routing / arrowhead / style, not a dashed line.
|
|
461
|
+
if (ghostScene) {
|
|
462
|
+
editor.overlayTarget.save();
|
|
463
|
+
editor.overlayTarget.setOpacity(GHOST_PREVIEW_OPACITY);
|
|
464
|
+
renderLinks(ghostScene, editor.overlayTarget, {});
|
|
465
|
+
editor.overlayTarget.restore();
|
|
466
|
+
}
|
|
467
|
+
// Live draw-edge connector preview — real link renderer, FULL opacity (the
|
|
468
|
+
// preview must look identical to the committed link, not faded/dashed).
|
|
469
|
+
if (edgePreviewScene) {
|
|
470
|
+
renderLinks(edgePreviewScene, editor.overlayTarget, {});
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
//# sourceMappingURL=render-orchestrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-orchestrator.js","sourceRoot":"","sources":["../../src/editor/render-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,OAAO,GAGR,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACnG,OAAO,EACL,aAAa,EACb,yBAAyB,GAG1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,4BAA4B,EAC5B,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAIzB;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,kBAA+B,CAAC;AAEhE,kEAAkE;AAClE,MAAM,oBAAoB,GAAG,uBAAiC,CAAC;AAE/D,oFAAoF;AACpF,MAAM,GAAG,GAAG,CAAI,CAAgB,EAAK,EAAE;IACrC,IAAI,CAAC,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC3E,OAAO,CAAC,CAAC;AACX,CA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