@html-graph/html-graph 3.17.0 → 3.18.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 +0 -4
- package/dist/html-graph.d.ts +13 -0
- package/dist/html-graph.js +354 -312
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,10 +8,6 @@
|
|
|
8
8
|
<img width="100%" src="https://raw.githubusercontent.com/html-graph/html-graph/master/media/full-demo.gif"/>
|
|
9
9
|
</a>
|
|
10
10
|
|
|
11
|
-
Instead of connecting nodes directly, this library utilizes the concept of ports,
|
|
12
|
-
which provide greater flexibility in managing edges. A port is an entity on a
|
|
13
|
-
node to which edges can be attached.
|
|
14
|
-
|
|
15
11
|
Visit the <a target="_blank" href="https://html-graph.github.io">DOCUMENTATION</a> for more details.
|
|
16
12
|
|
|
17
13
|
## Getting started:
|
package/dist/html-graph.d.ts
CHANGED
|
@@ -126,6 +126,7 @@ export declare class Canvas {
|
|
|
126
126
|
private readonly onBeforeEdgeRemoved;
|
|
127
127
|
private readonly onBeforeClear;
|
|
128
128
|
private readonly onBeforeDestroyEmitter;
|
|
129
|
+
private destroyed;
|
|
129
130
|
/**
|
|
130
131
|
* emits event just before destruction of canvas
|
|
131
132
|
*/
|
|
@@ -408,6 +409,7 @@ declare interface DraggableNodesConfig {
|
|
|
408
409
|
readonly mouseDownEventVerifier?: MouseEventVerifier;
|
|
409
410
|
readonly mouseUpEventVerifier?: MouseEventVerifier;
|
|
410
411
|
};
|
|
412
|
+
readonly gridSize?: number | null;
|
|
411
413
|
readonly events?: {
|
|
412
414
|
readonly onNodeDrag?: (payload: NodeDragPayload) => void;
|
|
413
415
|
readonly onBeforeNodeDrag?: (payload: NodeDragPayload) => boolean;
|
|
@@ -769,6 +771,9 @@ export { MidpointEdgeShape }
|
|
|
769
771
|
|
|
770
772
|
export declare type MouseEventVerifier = (event: MouseEvent) => boolean;
|
|
771
773
|
|
|
774
|
+
/**
|
|
775
|
+
* TODO: replace with node ID
|
|
776
|
+
*/
|
|
772
777
|
export declare interface NodeDragPayload {
|
|
773
778
|
readonly nodeId: unknown;
|
|
774
779
|
readonly element: HTMLElement;
|
|
@@ -1000,6 +1005,10 @@ declare type VerticalEdgeShapeConfig = {
|
|
|
1000
1005
|
|
|
1001
1006
|
export declare class Viewport {
|
|
1002
1007
|
private readonly viewportStore;
|
|
1008
|
+
/**
|
|
1009
|
+
* @deprecated
|
|
1010
|
+
* do not use
|
|
1011
|
+
*/
|
|
1003
1012
|
readonly onBeforeUpdated: EventHandler<void>;
|
|
1004
1013
|
readonly onAfterUpdated: EventHandler<void>;
|
|
1005
1014
|
constructor(viewportStore: ViewportStore);
|
|
@@ -1013,6 +1022,10 @@ declare class ViewportStore {
|
|
|
1013
1022
|
private readonly afterUpdateEmitter;
|
|
1014
1023
|
readonly onAfterUpdated: EventHandler<void>;
|
|
1015
1024
|
private readonly beforeUpdateEmitter;
|
|
1025
|
+
/**
|
|
1026
|
+
* @deprecated
|
|
1027
|
+
* do not use
|
|
1028
|
+
*/
|
|
1016
1029
|
readonly onBeforeUpdated: EventHandler<void>;
|
|
1017
1030
|
constructor();
|
|
1018
1031
|
getViewportMatrix(): TransformState;
|