@ue-too/board 0.14.0 → 0.15.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/README.md +21 -10
- package/boardify/index.d.ts +7 -8
- package/camera/base.d.ts +14 -14
- package/camera/camera-edge-auto-input.d.ts +1 -1
- package/camera/camera-mux/animation-and-lock/animation-and-lock.d.ts +5 -5
- package/camera/camera-mux/animation-and-lock/index.d.ts +4 -4
- package/camera/camera-mux/animation-and-lock/pan-control-state-machine.d.ts +21 -21
- package/camera/camera-mux/animation-and-lock/rotation-control-state-machine.d.ts +20 -20
- package/camera/camera-mux/animation-and-lock/zoom-control-state-machine.d.ts +46 -46
- package/camera/camera-mux/index.d.ts +3 -3
- package/camera/camera-mux/interface.d.ts +1 -1
- package/camera/camera-mux/relay.d.ts +2 -2
- package/camera/camera-rig/camera-rig.d.ts +6 -6
- package/camera/camera-rig/index.d.ts +4 -4
- package/camera/camera-rig/pan-handler.d.ts +2 -2
- package/camera/camera-rig/rotation-handler.d.ts +3 -1
- package/camera/camera-rig/zoom-handler.d.ts +1 -1
- package/camera/default-camera.d.ts +9 -7
- package/camera/index.d.ts +1 -1
- package/camera/interface.d.ts +7 -15
- package/camera/update-publisher.d.ts +16 -16
- package/camera/utils/coordinate-conversion.d.ts +4 -4
- package/camera/utils/index.d.ts +5 -5
- package/camera/utils/position.d.ts +11 -2
- package/index.d.ts +5 -5
- package/index.js +2 -2
- package/index.js.map +65 -63
- package/input-interpretation/index.d.ts +4 -4
- package/input-interpretation/input-orchestrator.d.ts +5 -5
- package/input-interpretation/input-state-machine/index.d.ts +4 -4
- package/input-interpretation/input-state-machine/kmt-input-context.d.ts +7 -7
- package/input-interpretation/input-state-machine/kmt-input-state-machine.d.ts +10 -11
- package/input-interpretation/input-state-machine/touch-input-context.d.ts +2 -2
- package/input-interpretation/input-state-machine/touch-input-state-machine.d.ts +8 -8
- package/input-interpretation/raw-input-parser/index.d.ts +2 -2
- package/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.d.ts +7 -3
- package/input-interpretation/raw-input-parser/vanilla-touch-event-parser.d.ts +2 -2
- package/input-interpretation/raw-input-publisher/index.d.ts +1 -1
- package/input-interpretation/raw-input-publisher/raw-input-publisher.d.ts +8 -8
- package/package.json +3 -3
- package/utils/canvas-position-dimension.d.ts +2 -1
- package/utils/coordinate-conversions/canvas-viewport.d.ts +1 -1
- package/utils/coordinate-conversions/index.d.ts +3 -0
- package/utils/coordinate-conversions/viewport-world.d.ts +1 -1
- package/utils/coordinate-conversions/window-canvas.d.ts +2 -2
- package/utils/coorindate-conversion.d.ts +2 -2
- package/utils/drawing-utils.d.ts +2 -2
- package/utils/drawing.d.ts +1 -1
- package/utils/index.d.ts +10 -8
- package/utils/scrollbar/index.d.ts +1 -0
- package/utils/scrollbar/scrollbar.d.ts +20 -0
- package/utils/zoomlevel-adjustment.d.ts +2 -2
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* @module
|
|
28
28
|
*/
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
29
|
+
export * from './input-state-machine';
|
|
30
|
+
export * from './raw-input-publisher';
|
|
31
|
+
export * from './raw-input-parser';
|
|
32
|
+
export * from './input-orchestrator';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { CameraMux } from '../camera/camera-mux';
|
|
2
|
+
import { CameraRig } from '../camera/camera-rig';
|
|
3
|
+
import { KmtOutputEvent } from './input-state-machine/kmt-input-state-machine';
|
|
4
|
+
import { TouchOutputEvent } from './input-state-machine/touch-input-state-machine';
|
|
5
|
+
import { UserInputPublisher } from './raw-input-publisher/raw-input-publisher';
|
|
6
6
|
/**
|
|
7
7
|
* Union type of all output events from state machines.
|
|
8
8
|
*
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @module
|
|
18
18
|
*/
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
19
|
+
export * from './kmt-input-context';
|
|
20
|
+
export * from './touch-input-context';
|
|
21
|
+
export * from './touch-input-state-machine';
|
|
22
|
+
export * from './kmt-input-state-machine';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { CanvasPositionDimensionPublisher, Observable, Observer, SubscriptionOptions } from
|
|
1
|
+
import { BaseContext } from '@ue-too/being';
|
|
2
|
+
import { Point } from '@ue-too/math';
|
|
3
|
+
import { CanvasPositionDimensionPublisher, Observable, Observer, SubscriptionOptions } from '../../utils';
|
|
4
4
|
/**
|
|
5
5
|
* Cursor styles used to provide visual feedback for different input states.
|
|
6
6
|
*
|
|
@@ -113,7 +113,7 @@ export declare class CanvasCacheInWebWorker implements Canvas {
|
|
|
113
113
|
get width(): number;
|
|
114
114
|
get height(): number;
|
|
115
115
|
get position(): Point;
|
|
116
|
-
setCursor(style:
|
|
116
|
+
setCursor(style: 'grab' | 'default' | 'grabbing'): void;
|
|
117
117
|
get detached(): boolean;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
@@ -158,7 +158,7 @@ export declare class CanvasProxy implements Canvas, Observable<[CanvasDimensions
|
|
|
158
158
|
setCanvasHeight(height: number): void;
|
|
159
159
|
get height(): number;
|
|
160
160
|
get position(): Point;
|
|
161
|
-
setCursor(style:
|
|
161
|
+
setCursor(style: 'grab' | 'default' | 'grabbing'): void;
|
|
162
162
|
tearDown(): void;
|
|
163
163
|
attach(canvas: HTMLCanvasElement): void;
|
|
164
164
|
logCanvasTrueSize(): void;
|
|
@@ -192,7 +192,7 @@ export declare class SvgProxy implements Canvas, Observable<[CanvasDimensions]>
|
|
|
192
192
|
setHeight(height: number): void;
|
|
193
193
|
get height(): number;
|
|
194
194
|
get position(): Point;
|
|
195
|
-
setCursor(style:
|
|
195
|
+
setCursor(style: 'grab' | 'default' | 'grabbing'): void;
|
|
196
196
|
tearDown(): void;
|
|
197
197
|
attach(svg: SVGSVGElement): void;
|
|
198
198
|
logCanvasTrueSize(): void;
|
|
@@ -221,7 +221,7 @@ export declare class WorkerRelayCanvas implements Canvas {
|
|
|
221
221
|
position: Point;
|
|
222
222
|
};
|
|
223
223
|
get detached(): boolean;
|
|
224
|
-
setCursor(style:
|
|
224
|
+
setCursor(style: 'grab' | 'default' | 'grabbing'): void;
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
227
227
|
* Context interface for the Keyboard/Mouse/Trackpad (KMT) input state machine.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Point } from
|
|
3
|
-
import { Canvas, CursorStyle, KmtInputContext } from
|
|
1
|
+
import { CreateStateType, EventArgs, EventGuards, EventReactions, EventResult, Guard, TemplateState, TemplateStateMachine } from '@ue-too/being';
|
|
2
|
+
import type { Point } from '@ue-too/math';
|
|
3
|
+
import { Canvas, CursorStyle, KmtInputContext } from './kmt-input-context';
|
|
4
4
|
declare const KMT_INPUT_STATES: readonly ["IDLE", "READY_TO_PAN_VIA_SPACEBAR", "READY_TO_PAN_VIA_SCROLL_WHEEL", "PAN", "INITIAL_PAN", "PAN_VIA_SCROLL_WHEEL", "DISABLED"];
|
|
5
5
|
/**
|
|
6
6
|
* Possible states of the Keyboard/Mouse/Trackpad input state machine.
|
|
@@ -117,20 +117,20 @@ export type KmtInputEventMapping = {
|
|
|
117
117
|
* @category Input State Machine - KMT
|
|
118
118
|
*/
|
|
119
119
|
export type KmtOutputEvent = {
|
|
120
|
-
type:
|
|
120
|
+
type: 'pan';
|
|
121
121
|
delta: Point;
|
|
122
122
|
} | {
|
|
123
|
-
type:
|
|
123
|
+
type: 'zoom';
|
|
124
124
|
delta: number;
|
|
125
125
|
anchorPointInViewPort: Point;
|
|
126
126
|
} | {
|
|
127
|
-
type:
|
|
127
|
+
type: 'rotate';
|
|
128
128
|
deltaRotation: number;
|
|
129
129
|
} | {
|
|
130
|
-
type:
|
|
130
|
+
type: 'cursor';
|
|
131
131
|
style: CursorStyle;
|
|
132
132
|
} | {
|
|
133
|
-
type:
|
|
133
|
+
type: 'none';
|
|
134
134
|
};
|
|
135
135
|
/**
|
|
136
136
|
* Mapping of events to their output types.
|
|
@@ -143,7 +143,6 @@ export type KmtOutputEvent = {
|
|
|
143
143
|
* @category Input State Machine - KMT
|
|
144
144
|
*/
|
|
145
145
|
export type KmtInputEventOutputMapping = {
|
|
146
|
-
spacebarDown: number;
|
|
147
146
|
middlePointerMove: KmtOutputEvent;
|
|
148
147
|
scroll: KmtOutputEvent;
|
|
149
148
|
scrollWithCtrl: KmtOutputEvent;
|
|
@@ -152,7 +151,7 @@ export type KmtInputEventOutputMapping = {
|
|
|
152
151
|
/**
|
|
153
152
|
* @internal
|
|
154
153
|
*/
|
|
155
|
-
export type KmtIdleStatePossibleTargetStates =
|
|
154
|
+
export type KmtIdleStatePossibleTargetStates = 'IDLE' | 'READY_TO_PAN_VIA_SPACEBAR' | 'READY_TO_PAN_VIA_SCROLL_WHEEL' | 'DISABLED';
|
|
156
155
|
/**
|
|
157
156
|
* IDLE state - default state waiting for user input.
|
|
158
157
|
*
|
|
@@ -179,7 +178,7 @@ export type KmtIdleStatePossibleTargetStates = "IDLE" | "READY_TO_PAN_VIA_SPACEB
|
|
|
179
178
|
*/
|
|
180
179
|
export declare class KmtIdleState extends TemplateState<KmtInputEventMapping, KmtInputContext, KmtInputStates, KmtInputEventOutputMapping> {
|
|
181
180
|
constructor();
|
|
182
|
-
protected _guards: Guard<KmtInputContext,
|
|
181
|
+
protected _guards: Guard<KmtInputContext, 'isIdle'>;
|
|
183
182
|
protected _eventGuards: Partial<EventGuards<KmtInputEventMapping, KmtInputStates, KmtInputContext, Guard<KmtInputContext>>>;
|
|
184
183
|
scrollPan: (context: KmtInputContext, payload: ScrollEventPayload) => KmtOutputEvent;
|
|
185
184
|
scrollZoom: (context: KmtInputContext, payload: ScrollWithCtrlEventPayload) => KmtOutputEvent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { EventGuards, EventReactions, Guard, TemplateState, TemplateStateMachine } from '@ue-too/being';
|
|
2
|
+
import type { Point } from '@ue-too/math';
|
|
3
|
+
import { TouchContext, TouchPoints } from './touch-input-context';
|
|
4
4
|
/**
|
|
5
5
|
* Possible states of the touch input state machine.
|
|
6
6
|
*
|
|
@@ -15,7 +15,7 @@ import type { Point } from "@ue-too/math";
|
|
|
15
15
|
*
|
|
16
16
|
* @category Input State Machine - Touch
|
|
17
17
|
*/
|
|
18
|
-
export type TouchStates =
|
|
18
|
+
export type TouchStates = 'IDLE' | 'PENDING' | 'IN_PROGRESS';
|
|
19
19
|
/**
|
|
20
20
|
* Payload for touch events containing active touch points.
|
|
21
21
|
*
|
|
@@ -50,14 +50,14 @@ export type TouchEventPayload = {
|
|
|
50
50
|
* @category Input State Machine - Touch
|
|
51
51
|
*/
|
|
52
52
|
export type TouchOutputEvent = {
|
|
53
|
-
type:
|
|
53
|
+
type: 'pan';
|
|
54
54
|
delta: Point;
|
|
55
55
|
} | {
|
|
56
|
-
type:
|
|
56
|
+
type: 'zoom';
|
|
57
57
|
delta: number;
|
|
58
58
|
anchorPointInViewPort: Point;
|
|
59
59
|
} | {
|
|
60
|
-
type:
|
|
60
|
+
type: 'none';
|
|
61
61
|
};
|
|
62
62
|
/**
|
|
63
63
|
* Event mapping for the touch input state machine.
|
|
@@ -100,7 +100,7 @@ export type TouchInputEventOutputMapping = {
|
|
|
100
100
|
*/
|
|
101
101
|
export declare class IdleState extends TemplateState<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping> {
|
|
102
102
|
protected _eventReactions: EventReactions<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>;
|
|
103
|
-
protected _guards: Guard<TouchContext,
|
|
103
|
+
protected _guards: Guard<TouchContext, 'touchPointsCount'>;
|
|
104
104
|
protected _eventGuards: Partial<EventGuards<TouchEventMapping, TouchStates, TouchContext, typeof this._guards>>;
|
|
105
105
|
touchstart(context: TouchContext, payload: TouchEventPayload): void;
|
|
106
106
|
touchend(context: TouchContext, payload: TouchEventPayload): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { InputOrchestrator } from
|
|
1
|
+
import type { EventResult } from '@ue-too/being';
|
|
2
|
+
import type { InputOrchestrator } from '../input-orchestrator';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for KMT (Keyboard/Mouse/Trackpad) event parsers.
|
|
5
5
|
*
|
|
@@ -147,6 +147,9 @@ export type EventTargetWithPointerEvents = {
|
|
|
147
147
|
* parser.tearDown();
|
|
148
148
|
* ```
|
|
149
149
|
*/
|
|
150
|
+
export interface StateMachine {
|
|
151
|
+
happens: (...args: any[]) => EventResult<any>;
|
|
152
|
+
}
|
|
150
153
|
export declare class VanillaKMTEventParser implements KMTEventParser {
|
|
151
154
|
private _disabled;
|
|
152
155
|
private _stateMachine;
|
|
@@ -154,7 +157,7 @@ export declare class VanillaKMTEventParser implements KMTEventParser {
|
|
|
154
157
|
private _keyfirstPressed;
|
|
155
158
|
private _abortController;
|
|
156
159
|
private _canvas?;
|
|
157
|
-
constructor(kmtInputStateMachine:
|
|
160
|
+
constructor(kmtInputStateMachine: StateMachine, orchestrator: InputOrchestrator, canvas?: HTMLCanvasElement | SVGSVGElement);
|
|
158
161
|
get disabled(): boolean;
|
|
159
162
|
disable(): void;
|
|
160
163
|
enable(): void;
|
|
@@ -170,4 +173,5 @@ export declare class VanillaKMTEventParser implements KMTEventParser {
|
|
|
170
173
|
keypressHandler(e: KeyboardEvent): void;
|
|
171
174
|
keyupHandler(e: KeyboardEvent): void;
|
|
172
175
|
attach(canvas: HTMLCanvasElement): void;
|
|
176
|
+
set stateMachine(stateMachine: StateMachine);
|
|
173
177
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TouchInputStateMachine } from
|
|
2
|
-
import type { InputOrchestrator } from
|
|
1
|
+
import { TouchInputStateMachine } from '../../input-interpretation/input-state-machine/touch-input-state-machine';
|
|
2
|
+
import type { InputOrchestrator } from '../input-orchestrator';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for touch event parsers.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Point } from
|
|
1
|
+
import type { Point } from '@ue-too/math';
|
|
2
2
|
/**
|
|
3
3
|
* Function to unsubscribe from raw user input events.
|
|
4
4
|
*
|
|
@@ -28,7 +28,7 @@ export type RawUserPanInputEventPayload = {
|
|
|
28
28
|
* @category Raw Input Publisher
|
|
29
29
|
*/
|
|
30
30
|
export type RawUserPanInputEvent = {
|
|
31
|
-
type:
|
|
31
|
+
type: 'pan';
|
|
32
32
|
} & RawUserPanInputEventPayload;
|
|
33
33
|
/**
|
|
34
34
|
* Payload for zoom input events.
|
|
@@ -52,7 +52,7 @@ export type RawUserZoomInputEventPayload = {
|
|
|
52
52
|
* @category Raw Input Publisher
|
|
53
53
|
*/
|
|
54
54
|
export type RawUserZoomInputEvent = {
|
|
55
|
-
type:
|
|
55
|
+
type: 'zoom';
|
|
56
56
|
} & RawUserZoomInputEventPayload;
|
|
57
57
|
/**
|
|
58
58
|
* Payload for rotate input events.
|
|
@@ -74,7 +74,7 @@ export type RawUserRotateInputEventPayload = {
|
|
|
74
74
|
* @category Raw Input Publisher
|
|
75
75
|
*/
|
|
76
76
|
export type RawUserRotateInputEvent = {
|
|
77
|
-
type:
|
|
77
|
+
type: 'rotate';
|
|
78
78
|
} & RawUserRotateInputEventPayload;
|
|
79
79
|
/**
|
|
80
80
|
* Mapping of event names to their payload types.
|
|
@@ -87,10 +87,10 @@ export type RawUserRotateInputEvent = {
|
|
|
87
87
|
* @category Raw Input Publisher
|
|
88
88
|
*/
|
|
89
89
|
export type RawUserInputEventMap = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
pan: RawUserPanInputEventPayload;
|
|
91
|
+
zoom: RawUserZoomInputEventPayload;
|
|
92
|
+
rotate: RawUserRotateInputEventPayload;
|
|
93
|
+
all: RawUserInputEvent;
|
|
94
94
|
};
|
|
95
95
|
/**
|
|
96
96
|
* Union type of all raw user input events.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ue-too/board",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./index.d.ts",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"types": "./index.d.ts",
|
|
15
15
|
"module": "./index.js",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ue-too/being": "^0.
|
|
18
|
-
"@ue-too/math": "^0.
|
|
17
|
+
"@ue-too/being": "^0.15.0",
|
|
18
|
+
"@ue-too/math": "^0.15.0"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Observer, SubscriptionOptions } from
|
|
1
|
+
import { Observer, SubscriptionOptions } from '../utils/observable';
|
|
2
2
|
/**
|
|
3
3
|
* Monitors and publishes position and dimension changes for SVG elements.
|
|
4
4
|
*
|
|
@@ -143,6 +143,7 @@ export declare class CanvasPositionDimensionPublisher {
|
|
|
143
143
|
private scrollHandler?;
|
|
144
144
|
private resizeHandler?;
|
|
145
145
|
private _observers;
|
|
146
|
+
private lastDOMMatrix?;
|
|
146
147
|
private _abortController;
|
|
147
148
|
private _pixelRatioAbortController;
|
|
148
149
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Point } from
|
|
2
|
-
import { Canvas } from
|
|
1
|
+
import { Point } from '@ue-too/math';
|
|
2
|
+
import { Canvas } from '../../input-interpretation/input-state-machine/kmt-input-context';
|
|
3
3
|
/**
|
|
4
4
|
* Converts a point from browser window coordinates to canvas coordinates.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Point } from
|
|
2
|
-
import { Canvas } from
|
|
1
|
+
import { Point } from '@ue-too/math';
|
|
2
|
+
import { Canvas } from '../input-interpretation/input-state-machine/kmt-input-context';
|
|
3
3
|
/**
|
|
4
4
|
* Converts an isometric 3D point to a flat 2D world point.
|
|
5
5
|
*
|
package/utils/drawing-utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Point } from
|
|
2
|
-
import { Boundaries } from
|
|
1
|
+
import type { Point } from '@ue-too/math';
|
|
2
|
+
import { Boundaries } from '../camera/utils/position';
|
|
3
3
|
/**
|
|
4
4
|
* @description Draws a crosshair on the canvas.
|
|
5
5
|
* @deprecated
|
package/utils/drawing.d.ts
CHANGED
package/utils/index.d.ts
CHANGED
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
*
|
|
20
20
|
* @module
|
|
21
21
|
*/
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
22
|
+
export * from './coorindate-conversion';
|
|
23
|
+
export * from './ruler';
|
|
24
|
+
export * from './observable';
|
|
25
|
+
export * from './handler-pipeline';
|
|
26
|
+
export * from './canvas-position-dimension';
|
|
27
|
+
export * from './drawing-utils';
|
|
28
|
+
export * from './drawing';
|
|
29
|
+
export * from './zoomlevel-adjustment';
|
|
30
|
+
export * from './scrollbar';
|
|
31
|
+
export * from './coordinate-conversions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scrollbar';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BoardCamera } from '../../camera';
|
|
2
|
+
export declare const getScrollBarDimension: (boardCamera: BoardCamera) => {
|
|
3
|
+
horizontal: number;
|
|
4
|
+
vertical: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The returned position is relative to the boundaries. (0 to 1)
|
|
8
|
+
* @param boardCamera
|
|
9
|
+
* @returns {horizontal: number | undefined, vertical: number | undefined}
|
|
10
|
+
*/
|
|
11
|
+
export declare const getScrollBarPosition: (boardCamera: BoardCamera) => {
|
|
12
|
+
horizontal: number | undefined;
|
|
13
|
+
vertical: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const getScrollBar: (camera: BoardCamera) => {
|
|
16
|
+
horizontalLength: number | undefined;
|
|
17
|
+
verticalLength: number | undefined;
|
|
18
|
+
horizontal: number | undefined;
|
|
19
|
+
vertical: number | undefined;
|
|
20
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Boundaries } from
|
|
2
|
-
import { ZoomLevelLimits } from
|
|
1
|
+
import { Boundaries } from '../camera/utils/position';
|
|
2
|
+
import { ZoomLevelLimits } from '../camera/utils/zoom';
|
|
3
3
|
/**
|
|
4
4
|
* Calculates minimum zoom level to fit boundaries within canvas at any rotation.
|
|
5
5
|
*
|