@html-graph/html-graph 0.1.1 → 0.1.3
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 -13
- package/dist/main.d.ts +4 -2
- package/dist/main.js +446 -419
- package/dist/main.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
### Graph visualization library that enables nodes customization using HTML
|
|
6
6
|
|
|
7
|
-

|
|
8
|
-
|
|
9
7
|
<a target="_blank" href="https://html-graph.github.io/use-cases/020-advanced-demo/">
|
|
10
8
|
<img width="100%" src="https://raw.githubusercontent.com/html-graph/html-graph/master/media/full-demo.gif"/>
|
|
11
9
|
</a>
|
|
12
10
|
|
|
13
11
|
Instead of connecting nodes directly this library uses concept of ports, which provide greater fexibility at managing edges.
|
|
14
|
-
Port is an entity of a node to which edge can be attached to.
|
|
12
|
+
Port is an entity of a node to which an edge can be attached to.
|
|
15
13
|
|
|
16
14
|
Visit <a target="_blank" href="https://html-graph.github.io/use-cases/">use cases</a> and [use cases implementation](use-cases).
|
|
17
15
|
|
|
@@ -87,13 +85,3 @@ canvas
|
|
|
87
85
|
.addNode(node2)
|
|
88
86
|
.addEdge({ from: "node-1-out", to: "node-2-in" });
|
|
89
87
|
```
|
|
90
|
-
|
|
91
|
-
## Features:
|
|
92
|
-
|
|
93
|
-
- easy nodes customization using HTML
|
|
94
|
-
- wide configuration options out of the box
|
|
95
|
-
- draggable and scalable canvas
|
|
96
|
-
- draggable and resize responsive nodes
|
|
97
|
-
- exhaustive set of use cases
|
|
98
|
-
- typescript support
|
|
99
|
-
- mobile devices support
|
package/dist/main.d.ts
CHANGED
|
@@ -248,6 +248,7 @@ export declare interface DragOptions {
|
|
|
248
248
|
readonly events?: {
|
|
249
249
|
readonly onNodeDrag?: (payload: NodeDragPayload) => void;
|
|
250
250
|
readonly onBeforeNodeDrag?: (payload: NodeDragPayload) => boolean;
|
|
251
|
+
readonly onNodeDragFinished?: (nodeId: NodeDragPayload) => void;
|
|
251
252
|
};
|
|
252
253
|
}
|
|
253
254
|
|
|
@@ -579,7 +580,7 @@ export declare type TransformFinishedFn = () => void;
|
|
|
579
580
|
|
|
580
581
|
export declare interface TransformOptions {
|
|
581
582
|
readonly scale?: {
|
|
582
|
-
readonly
|
|
583
|
+
readonly mouseWheelSensitivity?: number;
|
|
583
584
|
};
|
|
584
585
|
readonly shift?: {
|
|
585
586
|
readonly cursor?: string | null;
|
|
@@ -631,7 +632,7 @@ export declare interface UpdateEdgeRequest {
|
|
|
631
632
|
readonly priority?: number;
|
|
632
633
|
}
|
|
633
634
|
|
|
634
|
-
declare interface UpdateNodeRequest {
|
|
635
|
+
export declare interface UpdateNodeRequest {
|
|
635
636
|
readonly x?: number;
|
|
636
637
|
readonly y?: number;
|
|
637
638
|
readonly priority?: number;
|
|
@@ -651,6 +652,7 @@ export declare class UserDraggableNodesCanvas implements Canvas {
|
|
|
651
652
|
private grabbedNodeId;
|
|
652
653
|
private onNodeDrag;
|
|
653
654
|
private onBeforeNodeDrag;
|
|
655
|
+
private onNodeDragFinished;
|
|
654
656
|
private readonly nodeIdGenerator;
|
|
655
657
|
private element;
|
|
656
658
|
private readonly onWindowMouseMove;
|