@plait/core 0.32.0 → 0.34.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/esm2022/board/board.component.mjs +3 -12
- package/esm2022/plugins/with-moving.mjs +4 -1
- package/esm2022/utils/math.mjs +52 -1
- package/esm2022/utils/selected-element.mjs +11 -1
- package/esm2022/utils/viewport.mjs +32 -4
- package/fesm2022/plait-core.mjs +220 -137
- package/fesm2022/plait-core.mjs.map +1 -1
- package/package.json +1 -1
- package/utils/math.d.ts +1 -0
- package/utils/selected-element.d.ts +2 -0
- package/utils/viewport.d.ts +1 -0
package/package.json
CHANGED
package/utils/math.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export declare const isPointInPolygon: (point: Point, points: Point[]) => boolea
|
|
|
13
13
|
export declare const isPointInEllipse: (point: Point, center: Point, rx: number, ry: number, rotation?: number) => boolean;
|
|
14
14
|
export declare const isPointInRoundRectangle: (point: Point, rectangle: RectangleClient, radius: number) => boolean;
|
|
15
15
|
export declare const downScale: (number: number) => number;
|
|
16
|
+
export declare const catmullRomFitting: (points: Point[]) => Point[];
|
|
@@ -2,6 +2,7 @@ import { PlaitBoard } from '../interfaces/board';
|
|
|
2
2
|
import { Selection } from '../interfaces/selection';
|
|
3
3
|
import { PlaitElement } from '../interfaces/element';
|
|
4
4
|
import { Point } from '../interfaces/point';
|
|
5
|
+
import { PlaitOptionsBoard } from '../public-api';
|
|
5
6
|
export declare const getHitElementsBySelection: (board: PlaitBoard, selection?: Selection, match?: (element: PlaitElement) => boolean) => PlaitElement[];
|
|
6
7
|
export declare const getHitElementByPoint: (board: PlaitBoard, point: Point, match?: (element: PlaitElement) => boolean) => undefined | PlaitElement;
|
|
7
8
|
export declare const cacheSelectedElements: (board: PlaitBoard, selectedElements: PlaitElement[]) => void;
|
|
@@ -10,3 +11,4 @@ export declare const addSelectedElement: (board: PlaitBoard, element: PlaitEleme
|
|
|
10
11
|
export declare const removeSelectedElement: (board: PlaitBoard, element: PlaitElement) => void;
|
|
11
12
|
export declare const clearSelectedElement: (board: PlaitBoard) => void;
|
|
12
13
|
export declare const isSelectedElement: (board: PlaitBoard, element: PlaitElement) => boolean;
|
|
14
|
+
export declare const temporaryDisableSelection: (board: PlaitOptionsBoard) => void;
|
package/utils/viewport.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function getViewBoxCenterPoint(board: PlaitBoard): Point;
|
|
|
22
22
|
export declare function setSVGViewBox(board: PlaitBoard, viewBox: number[]): void;
|
|
23
23
|
export declare function updateViewportOffset(board: PlaitBoard): void;
|
|
24
24
|
export declare function updateViewportContainerScroll(board: PlaitBoard, left: number, top: number, isFromViewportChange?: boolean): void;
|
|
25
|
+
export declare function updateViewportByScrolling(board: PlaitBoard, scrollLeft: number, scrollTop: number): void;
|
|
25
26
|
export declare function initializeViewportContainer(board: PlaitBoard): void;
|
|
26
27
|
export declare function initializeViewBox(board: PlaitBoard): void;
|
|
27
28
|
export declare function initializeViewportOffset(board: PlaitBoard): void;
|