@excalidraw/excalidraw 0.12.0-3d9d398 → 0.12.0-45b5922
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/package.json
CHANGED
|
@@ -4,26 +4,26 @@ import { Point, AppState } from "../types";
|
|
|
4
4
|
import History from "../history";
|
|
5
5
|
import Scene from "../scene/Scene";
|
|
6
6
|
export declare class LinearElementEditor {
|
|
7
|
-
elementId: ExcalidrawElement["id"] & {
|
|
7
|
+
readonly elementId: ExcalidrawElement["id"] & {
|
|
8
8
|
_brand: "excalidrawLinearElementId";
|
|
9
9
|
};
|
|
10
10
|
/** indices */
|
|
11
|
-
selectedPointsIndices: readonly number[] | null;
|
|
12
|
-
pointerDownState: Readonly<{
|
|
11
|
+
readonly selectedPointsIndices: readonly number[] | null;
|
|
12
|
+
readonly pointerDownState: Readonly<{
|
|
13
13
|
prevSelectedPointsIndices: readonly number[] | null;
|
|
14
14
|
/** index */
|
|
15
15
|
lastClickedPoint: number;
|
|
16
16
|
}>;
|
|
17
17
|
/** whether you're dragging a point */
|
|
18
|
-
isDragging: boolean;
|
|
19
|
-
lastUncommittedPoint: Point | null;
|
|
20
|
-
pointerOffset: Readonly<{
|
|
18
|
+
readonly isDragging: boolean;
|
|
19
|
+
readonly lastUncommittedPoint: Point | null;
|
|
20
|
+
readonly pointerOffset: Readonly<{
|
|
21
21
|
x: number;
|
|
22
22
|
y: number;
|
|
23
23
|
}>;
|
|
24
|
-
startBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
25
|
-
endBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
26
|
-
hoverPointIndex: number;
|
|
24
|
+
readonly startBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
25
|
+
readonly endBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
26
|
+
readonly hoverPointIndex: number;
|
|
27
27
|
constructor(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene);
|
|
28
28
|
static POINT_HANDLE_SIZE: number;
|
|
29
29
|
/**
|
|
@@ -33,7 +33,7 @@ export declare class LinearElementEditor {
|
|
|
33
33
|
static getElement(id: InstanceType<typeof LinearElementEditor>["elementId"]): NonDeleted<ExcalidrawLinearElement> | null;
|
|
34
34
|
static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"]): false | undefined;
|
|
35
35
|
/** @returns whether point was dragged */
|
|
36
|
-
static handlePointDragging(appState: AppState, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
|
|
36
|
+
static handlePointDragging(event: PointerEvent, appState: AppState, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
|
|
37
37
|
x: number;
|
|
38
38
|
y: number;
|
|
39
39
|
}[]) => void, linearElementEditor: LinearElementEditor): boolean;
|
|
@@ -78,7 +78,6 @@ export declare class LinearElementEditor {
|
|
|
78
78
|
/** index */
|
|
79
79
|
lastClickedPoint: number;
|
|
80
80
|
}>;
|
|
81
|
-
/** whether you're dragging a point */
|
|
82
81
|
isDragging: boolean;
|
|
83
82
|
lastUncommittedPoint: readonly [number, number] | null;
|
|
84
83
|
pointerOffset: Readonly<{
|
|
@@ -137,7 +136,7 @@ export declare class LinearElementEditor {
|
|
|
137
136
|
scrolledOutside: boolean;
|
|
138
137
|
name: string;
|
|
139
138
|
isResizing: boolean;
|
|
140
|
-
isRotating: boolean;
|
|
139
|
+
isRotating: boolean; /** @returns whether point was dragged */
|
|
141
140
|
zoom: Readonly<{
|
|
142
141
|
value: import("../types").NormalizedZoomValue;
|
|
143
142
|
}>;
|
|
@@ -200,4 +199,5 @@ export declare class LinearElementEditor {
|
|
|
200
199
|
endBinding?: PointBinding;
|
|
201
200
|
}): void;
|
|
202
201
|
private static _updatePoints;
|
|
202
|
+
private static _getShiftLockedDelta;
|
|
203
203
|
}
|