@plait/draw 0.31.0 → 0.32.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/constants/line.d.ts +1 -0
- package/esm2022/constants/line.mjs +2 -1
- package/esm2022/utils/hit.mjs +21 -7
- package/esm2022/utils/line-arrow.mjs +22 -17
- package/esm2022/utils/line.mjs +6 -9
- package/fesm2022/plait-draw.mjs +46 -29
- package/fesm2022/plait-draw.mjs.map +1 -1
- package/package.json +1 -1
- package/utils/clipboard.d.ts +1 -1
- package/utils/geometry.d.ts +1 -1
- package/utils/hit.d.ts +2 -0
- package/utils/line.d.ts +0 -1
package/package.json
CHANGED
package/utils/clipboard.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PlaitBoard, Point } from '@plait/core';
|
|
2
2
|
import { PlaitDrawElement, PlaitGeometry, PlaitLine } from '../interfaces';
|
|
3
|
-
export declare const buildClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => (
|
|
3
|
+
export declare const buildClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => (PlaitLine | PlaitGeometry)[];
|
|
4
4
|
export declare const insertClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => void;
|
package/utils/geometry.d.ts
CHANGED
|
@@ -34,4 +34,4 @@ export declare const getDefaultFlowchartProperty: (symbol: FlowchartSymbols) =>
|
|
|
34
34
|
width: number;
|
|
35
35
|
height: number;
|
|
36
36
|
};
|
|
37
|
-
export declare const createDefaultFlowchart: (point: Point) => (
|
|
37
|
+
export declare const createDefaultFlowchart: (point: Point) => (import("../interfaces").PlaitLine | PlaitGeometry)[];
|
package/utils/hit.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { PlaitElement, Selection, PlaitBoard, Point } from '@plait/core';
|
|
2
|
+
import { PlaitGeometry } from '../interfaces';
|
|
3
|
+
export declare const isTextExceedingBounds: (geometry: PlaitGeometry) => boolean;
|
|
2
4
|
export declare const isRectangleHitDrawElement: (board: PlaitBoard, element: PlaitElement, selection: Selection) => boolean | null;
|
|
3
5
|
export declare const isHitDrawElement: (board: PlaitBoard, element: PlaitElement, point: Point) => boolean | null;
|
package/utils/line.d.ts
CHANGED
|
@@ -19,6 +19,5 @@ export declare const transformPointToConnection: (board: PlaitBoard, point: Poin
|
|
|
19
19
|
export declare const getHitConnectorPoint: (movingPoint: Point, hitElement: PlaitGeometry, rectangle: RectangleClient) => Point | undefined;
|
|
20
20
|
export declare const getLineTextRectangle: (board: PlaitBoard, element: PlaitLine, index: number) => RectangleClient;
|
|
21
21
|
export declare const getBoardLines: (board: PlaitBoard) => PlaitLine[];
|
|
22
|
-
export declare const getExtendPoint: (source: Point, target: Point, extendDistance: number) => Point;
|
|
23
22
|
export declare const Q2C: (points: Point[]) => Point[];
|
|
24
23
|
export declare const getVectorByConnection: (boundElement: PlaitGeometry, connection: PointOfRectangle) => Vector;
|