@html-graph/html-graph 3.17.0 → 3.19.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 +20 -2
- package/dist/html-graph.js +365 -316
- 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
|
*/
|
|
@@ -205,7 +206,7 @@ export declare class CanvasBuilder {
|
|
|
205
206
|
private virtualScrollConfig;
|
|
206
207
|
private hasDraggableNode;
|
|
207
208
|
private hasTransformableViewport;
|
|
208
|
-
private
|
|
209
|
+
private hasNodeResizeReactiveEdges;
|
|
209
210
|
private hasBackground;
|
|
210
211
|
private hasUserConnectablePorts;
|
|
211
212
|
private hasUserDraggableEdges;
|
|
@@ -230,9 +231,14 @@ export declare class CanvasBuilder {
|
|
|
230
231
|
*/
|
|
231
232
|
enableUserTransformableViewport(config?: ViewportTransformConfig): CanvasBuilder;
|
|
232
233
|
/**
|
|
233
|
-
*
|
|
234
|
+
* @deprecated
|
|
235
|
+
* use enableNodeResizeReactiveEdges instead
|
|
234
236
|
*/
|
|
235
237
|
enableResizeReactiveNodes(): CanvasBuilder;
|
|
238
|
+
/**
|
|
239
|
+
* enables automatic edges update on node resize
|
|
240
|
+
*/
|
|
241
|
+
enableNodeResizeReactiveEdges(): CanvasBuilder;
|
|
236
242
|
/**
|
|
237
243
|
* @deprecated
|
|
238
244
|
* do not use
|
|
@@ -408,6 +414,7 @@ declare interface DraggableNodesConfig {
|
|
|
408
414
|
readonly mouseDownEventVerifier?: MouseEventVerifier;
|
|
409
415
|
readonly mouseUpEventVerifier?: MouseEventVerifier;
|
|
410
416
|
};
|
|
417
|
+
readonly gridSize?: number | null;
|
|
411
418
|
readonly events?: {
|
|
412
419
|
readonly onNodeDrag?: (payload: NodeDragPayload) => void;
|
|
413
420
|
readonly onBeforeNodeDrag?: (payload: NodeDragPayload) => boolean;
|
|
@@ -769,6 +776,9 @@ export { MidpointEdgeShape }
|
|
|
769
776
|
|
|
770
777
|
export declare type MouseEventVerifier = (event: MouseEvent) => boolean;
|
|
771
778
|
|
|
779
|
+
/**
|
|
780
|
+
* TODO: replace with node ID
|
|
781
|
+
*/
|
|
772
782
|
export declare interface NodeDragPayload {
|
|
773
783
|
readonly nodeId: unknown;
|
|
774
784
|
readonly element: HTMLElement;
|
|
@@ -1000,6 +1010,10 @@ declare type VerticalEdgeShapeConfig = {
|
|
|
1000
1010
|
|
|
1001
1011
|
export declare class Viewport {
|
|
1002
1012
|
private readonly viewportStore;
|
|
1013
|
+
/**
|
|
1014
|
+
* @deprecated
|
|
1015
|
+
* do not use
|
|
1016
|
+
*/
|
|
1003
1017
|
readonly onBeforeUpdated: EventHandler<void>;
|
|
1004
1018
|
readonly onAfterUpdated: EventHandler<void>;
|
|
1005
1019
|
constructor(viewportStore: ViewportStore);
|
|
@@ -1013,6 +1027,10 @@ declare class ViewportStore {
|
|
|
1013
1027
|
private readonly afterUpdateEmitter;
|
|
1014
1028
|
readonly onAfterUpdated: EventHandler<void>;
|
|
1015
1029
|
private readonly beforeUpdateEmitter;
|
|
1030
|
+
/**
|
|
1031
|
+
* @deprecated
|
|
1032
|
+
* do not use
|
|
1033
|
+
*/
|
|
1016
1034
|
readonly onBeforeUpdated: EventHandler<void>;
|
|
1017
1035
|
constructor();
|
|
1018
1036
|
getViewportMatrix(): TransformState;
|