@html-graph/html-graph 0.1.4 → 0.1.6
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 +1 -1
- package/dist/main.d.ts +13 -12
- package/dist/main.js +332 -316
- package/dist/main.umd.cjs +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
Instead of connecting nodes directly this library uses concept of ports, which provide greater fexibility at managing edges.
|
|
12
12
|
Port is an entity of a node to which edges can be attached to.
|
|
13
13
|
|
|
14
|
-
Visit <a target="_blank" href="https://html-graph.github.io
|
|
14
|
+
Visit <a target="_blank" href="https://html-graph.github.io">DOCUMENTATION</a> for more.
|
|
15
15
|
|
|
16
16
|
## Getting started:
|
|
17
17
|
|
package/dist/main.d.ts
CHANGED
|
@@ -42,8 +42,6 @@ declare interface AddPortRequest {
|
|
|
42
42
|
readonly direction: number;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export declare type BeforeTransformChangeFn = () => void;
|
|
46
|
-
|
|
47
45
|
export declare interface BezierEdgeParams {
|
|
48
46
|
readonly color?: string | undefined;
|
|
49
47
|
readonly width?: number | undefined;
|
|
@@ -244,7 +242,11 @@ declare type CustomPriority = PriorityFn;
|
|
|
244
242
|
|
|
245
243
|
export declare interface DragOptions {
|
|
246
244
|
readonly moveOnTop?: boolean;
|
|
247
|
-
readonly
|
|
245
|
+
readonly mouse?: {
|
|
246
|
+
readonly dragCursor?: string | null;
|
|
247
|
+
readonly mouseDownEventValidator?: (event: MouseEvent) => boolean;
|
|
248
|
+
readonly mouseUpEventValidator?: (event: MouseEvent) => boolean;
|
|
249
|
+
};
|
|
248
250
|
readonly events?: {
|
|
249
251
|
readonly onNodeDrag?: (payload: NodeDragPayload) => void;
|
|
250
252
|
readonly onBeforeNodeDrag?: (payload: NodeDragPayload) => boolean;
|
|
@@ -576,19 +578,22 @@ declare interface StraightEdgeShape_2 {
|
|
|
576
578
|
readonly detourDirection?: number;
|
|
577
579
|
}
|
|
578
580
|
|
|
579
|
-
export declare type TransformChangeFn = () => void;
|
|
580
|
-
|
|
581
581
|
export declare interface TransformOptions {
|
|
582
582
|
readonly scale?: {
|
|
583
583
|
readonly mouseWheelSensitivity?: number;
|
|
584
|
+
readonly mouseWheelEventValidator?: (event: WheelEvent) => boolean;
|
|
584
585
|
};
|
|
585
586
|
readonly shift?: {
|
|
586
587
|
readonly cursor?: string | null;
|
|
588
|
+
readonly mouseDownEventValidator?: (event: MouseEvent) => boolean;
|
|
589
|
+
readonly mouseUpEventValidator?: (event: MouseEvent) => boolean;
|
|
587
590
|
};
|
|
588
591
|
readonly transformPreprocessor?: TransformPreprocessorOption | TransformPreprocessorOption[];
|
|
589
592
|
readonly events?: {
|
|
590
|
-
readonly
|
|
591
|
-
readonly
|
|
593
|
+
readonly onTransformStarted?: () => void;
|
|
594
|
+
readonly onTransformFinished?: () => void;
|
|
595
|
+
readonly onBeforeTransformChange?: () => void;
|
|
596
|
+
readonly onTransformChange?: () => void;
|
|
592
597
|
};
|
|
593
598
|
}
|
|
594
599
|
|
|
@@ -650,9 +655,6 @@ export declare class UserDraggableNodesCanvas implements Canvas {
|
|
|
650
655
|
private maxNodePriority;
|
|
651
656
|
private readonly nodes;
|
|
652
657
|
private grabbedNodeId;
|
|
653
|
-
private onNodeDrag;
|
|
654
|
-
private onBeforeNodeDrag;
|
|
655
|
-
private onNodeDragFinished;
|
|
656
658
|
private readonly nodeIdGenerator;
|
|
657
659
|
private element;
|
|
658
660
|
private readonly onWindowMouseMove;
|
|
@@ -660,9 +662,8 @@ export declare class UserDraggableNodesCanvas implements Canvas {
|
|
|
660
662
|
private readonly onWindowTouchMove;
|
|
661
663
|
private readonly onWindowTouchFinish;
|
|
662
664
|
private previousTouchCoords;
|
|
663
|
-
private readonly freezePriority;
|
|
664
665
|
private readonly window;
|
|
665
|
-
private readonly
|
|
666
|
+
private readonly options;
|
|
666
667
|
constructor(canvas: Canvas, dragOptions?: DragOptions);
|
|
667
668
|
attach(element: HTMLElement): UserDraggableNodesCanvas;
|
|
668
669
|
detach(): UserDraggableNodesCanvas;
|