@johnoscott/isometric-engine 0.12.3 → 0.14.1
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/EDITOR-GUIDE.md +10 -2
- package/README.md +1 -1
- package/assets/app.css +12 -0
- package/assets/marks.css +2 -0
- package/iso-editor.js +189 -188
- package/iso-render.js +82 -82
- package/iso-systems.js +79 -79
- package/js/iso-editor/commands.js +7 -0
- package/js/iso-editor/connections.js +24 -0
- package/js/iso-editor/make-way.js +62 -0
- package/js/iso-editor/model.js +17 -3
- package/js/iso-editor/ui/actions.js +22 -24
- package/js/iso-editor/ui/canvas.js +564 -223
- package/js/iso-editor/ui/mount.js +2 -1
- package/js/iso-editor/ui/palette-look.js +53 -0
- package/js/iso-editor/ui/props.js +2 -2
- package/js/iso-editor/ui/rename.js +114 -0
- package/js/iso-editor/ui/setup.js +4 -0
- package/js/iso-viewer/viewport.js +17 -5
- package/package.json +1 -1
- package/src/iso-editor/commands.ts +9 -0
- package/src/iso-editor/connections.ts +28 -0
- package/src/iso-editor/make-way.ts +89 -0
- package/src/iso-editor/model.ts +17 -3
- package/src/iso-editor/ui/actions.ts +20 -23
- package/src/iso-editor/ui/app.css +10 -0
- package/src/iso-editor/ui/canvas.ts +469 -180
- package/src/iso-editor/ui/marks.css +2 -0
- package/src/iso-editor/ui/mount.ts +4 -3
- package/src/iso-editor/ui/palette-look.ts +51 -0
- package/src/iso-editor/ui/props.ts +3 -3
- package/src/iso-editor/ui/rename.ts +105 -0
- package/src/iso-editor/ui/setup.ts +11 -0
- package/src/iso-viewer/viewport.ts +25 -5
- package/types/iso-editor/connections.d.ts +8 -0
- package/types/iso-editor/make-way.d.ts +40 -0
- package/types/iso-editor/model.d.ts +8 -2
- package/types/iso-editor/ui/actions.d.ts +5 -2
- package/types/iso-editor/ui/canvas.d.ts +42 -12
- package/types/iso-editor/ui/mount.d.ts +6 -2
- package/types/iso-editor/ui/palette-look.d.ts +5 -0
- package/types/iso-editor/ui/props.d.ts +1 -1
- package/types/iso-editor/ui/rename.d.ts +43 -0
- package/types/iso-editor/ui/setup.d.ts +7 -0
- package/types/iso-viewer/viewport.d.ts +13 -1
|
@@ -39,6 +39,13 @@ export interface DomainView<R, D extends CanvasDrawing> {
|
|
|
39
39
|
/** (0.12.0) the palette 'floating' over the canvas (the default) or 'docked': a pane of its own at the canvas's left,
|
|
40
40
|
* searchable by label and section, resizable and collapsible */
|
|
41
41
|
paletteLayout?: 'floating' | 'docked';
|
|
42
|
+
/** (0.12.5) what a double click on an object of the canvas does: shows it in the text (the default), or renames it */
|
|
43
|
+
doubleClick?: 'text' | 'rename';
|
|
44
|
+
/** (0.14.0) the palette's entries with their icon (the default), or with the thing itself, drawn small in the current theme */
|
|
45
|
+
paletteLook?: 'icon' | 'object';
|
|
46
|
+
/** (0.14.0) what is in a drag's way jiggles before it gives way, and glides: 'always' (the default), or 'respect': not where
|
|
47
|
+
* the viewer prefers reduced motion */
|
|
48
|
+
dragMotion?: 'always' | 'respect';
|
|
42
49
|
/** the canvas's 2D view (0.6.0): a 3D | 2D switch; its link kinds' styles (the host's canvas CSS adds flatCss) */
|
|
43
50
|
flat?: CanvasKit<R, D>['flat'];
|
|
44
51
|
/** a layer over the canvas, and a part beside the views (A: their calls) */
|
|
@@ -4,6 +4,16 @@ export type View = {
|
|
|
4
4
|
w: number;
|
|
5
5
|
h: number;
|
|
6
6
|
};
|
|
7
|
+
/** What a fit makes of a stage (px) and what it frames, `box` PAD px inside it, and what must be on it too, `also` INSET px inside:
|
|
8
|
+
* the zoom and the middle. Pure. */
|
|
9
|
+
export declare function fitted(s: {
|
|
10
|
+
w: number;
|
|
11
|
+
h: number;
|
|
12
|
+
}, box: View, also?: View): {
|
|
13
|
+
k: number;
|
|
14
|
+
cx: number;
|
|
15
|
+
cy: number;
|
|
16
|
+
};
|
|
7
17
|
export declare const MIN_ZOOM = 0.1, MAX_ZOOM = 8;
|
|
8
18
|
export interface ViewportOpts {
|
|
9
19
|
/** the drawing on the stage (its viewBox is the view), if any */
|
|
@@ -14,6 +24,8 @@ export interface ViewportOpts {
|
|
|
14
24
|
onRezoom(): void;
|
|
15
25
|
/** what a fit frames (the drawing's own things, the overlay's shown marks), if not the whole scene */
|
|
16
26
|
itemsBox(): View | undefined;
|
|
27
|
+
/** (0.12.6) what must be on the stage too when the things are fitted (the connectors), a few px from its edges */
|
|
28
|
+
alsoBox?(): View | undefined;
|
|
17
29
|
/** the overlay has marks that keep their size on screen (a fit repeats while they are showing) */
|
|
18
30
|
marksShowing(): boolean;
|
|
19
31
|
}
|
|
@@ -40,7 +52,7 @@ export declare function viewport(host: HTMLElement, o: ViewportOpts): {
|
|
|
40
52
|
y: number;
|
|
41
53
|
};
|
|
42
54
|
zoomAt: (f: number, cx?: number, cy?: number) => void;
|
|
43
|
-
fit: (box?: View | undefined) => void;
|
|
55
|
+
fit: (box?: View | undefined, also?: View) => void;
|
|
44
56
|
fitItems: () => void;
|
|
45
57
|
autoFit: () => void;
|
|
46
58
|
actual: () => void;
|