@html-graph/html-graph 0.0.57 → 0.0.58
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 +2 -2
- package/dist/main.d.ts +16 -9
- package/dist/main.js +1213 -1224
- package/dist/main.umd.cjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<img width="100%" src="https://raw.githubusercontent.com/html-graph/html-graph/master/media/full-demo.gif"/>
|
|
11
11
|
</a>
|
|
12
12
|
|
|
13
|
-
Visit <a target="_blank" href="https://html-graph.github.io">use cases</a> and [use cases implementation](use-cases).
|
|
14
|
-
|
|
15
13
|
Instead of connecting nodes directly this library uses concept of ports, which provide greater fexibility at managing edges.
|
|
16
14
|
Port is an entity of a node to which edge can be attached to.
|
|
17
15
|
|
|
16
|
+
Visit <a target="_blank" href="https://html-graph.github.io">use cases</a> and [use cases implementation](use-cases).
|
|
17
|
+
|
|
18
18
|
## Features:
|
|
19
19
|
|
|
20
20
|
- easy nodes customization using HTML
|
package/dist/main.d.ts
CHANGED
|
@@ -51,7 +51,8 @@ export declare class BezierEdgeShape implements EdgeShape {
|
|
|
51
51
|
private readonly sourceArrow;
|
|
52
52
|
private readonly targetArrow;
|
|
53
53
|
constructor(color: string, width: number, curvature: number, arrowLength: number, arrowWidth: number, hasSourceArrow: boolean, hasTargetArrow: boolean);
|
|
54
|
-
update(
|
|
54
|
+
update(to: Point, flipX: number, flipY: number, fromDir: number, toDir: number): void;
|
|
55
|
+
private createLinePath;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
declare interface BezierEdgeShape_2 {
|
|
@@ -161,7 +162,7 @@ export declare class CanvasCore implements Canvas {
|
|
|
161
162
|
updateNode(nodeId: unknown, request: UpdateNodeRequest): CanvasCore;
|
|
162
163
|
removeNode(nodeId: unknown): CanvasCore;
|
|
163
164
|
markPort(port: MarkPortRequest): CanvasCore;
|
|
164
|
-
updatePort(portId: string, request
|
|
165
|
+
updatePort(portId: string, request?: UpdatePortRequest): CanvasCore;
|
|
165
166
|
unmarkPort(portId: string): CanvasCore;
|
|
166
167
|
addEdge(edge: AddEdgeRequest): CanvasCore;
|
|
167
168
|
updateEdge(edgeId: unknown, request: UpdateEdgeRequest): CanvasCore;
|
|
@@ -299,7 +300,8 @@ export declare class CycleCircleEdgeShape implements EdgeShape {
|
|
|
299
300
|
private readonly line;
|
|
300
301
|
private readonly arrow;
|
|
301
302
|
constructor(color: string, width: number, arrowLength: number, arrowWidth: number, hasArrow: boolean, radius: number, smallRadius: number);
|
|
302
|
-
update(
|
|
303
|
+
update(_to: Point, flipX: number, flipY: number, fromDir: number): void;
|
|
304
|
+
private createLinePath;
|
|
303
305
|
}
|
|
304
306
|
|
|
305
307
|
export declare class CycleSquareEdgeShape implements EdgeShape {
|
|
@@ -314,7 +316,8 @@ export declare class CycleSquareEdgeShape implements EdgeShape {
|
|
|
314
316
|
private readonly roundness;
|
|
315
317
|
private readonly linePoints;
|
|
316
318
|
constructor(color: string, width: number, arrowLength: number, arrowWidth: number, hasArrow: boolean, side: number, minPortOffset: number, roundness: number);
|
|
317
|
-
update(
|
|
319
|
+
update(_to: Point, flipX: number, flipY: number, fromDir: number): void;
|
|
320
|
+
private createLinePath;
|
|
318
321
|
}
|
|
319
322
|
|
|
320
323
|
export declare class DetourStraightEdgeShape implements EdgeShape {
|
|
@@ -330,7 +333,8 @@ export declare class DetourStraightEdgeShape implements EdgeShape {
|
|
|
330
333
|
private readonly detourX;
|
|
331
334
|
private readonly detourY;
|
|
332
335
|
constructor(color: string, width: number, arrowLength: number, arrowWidth: number, arrowOffset: number, hasSourceArrow: boolean, hasTargetArrow: boolean, roundness: number, detourDistance: number, detourDirection: number);
|
|
333
|
-
update(
|
|
336
|
+
update(to: Point, flipX: number, flipY: number, fromDir: number, toDir: number): void;
|
|
337
|
+
private createLinePath;
|
|
334
338
|
}
|
|
335
339
|
|
|
336
340
|
export declare interface DragOptions {
|
|
@@ -351,7 +355,7 @@ declare interface EdgePayload {
|
|
|
351
355
|
|
|
352
356
|
export declare interface EdgeShape {
|
|
353
357
|
readonly svg: SVGSVGElement;
|
|
354
|
-
update(
|
|
358
|
+
update(to: Point, flipX: number, flipY: number, fromDir: number, toDir: number): void;
|
|
355
359
|
}
|
|
356
360
|
|
|
357
361
|
declare type EdgeShape_2 = BezierEdgeShape_2 | StraightEdgeShape_2 | CustomEdgeShape | HorizontalEdgeShape_2 | VerticalEdgeShape_2;
|
|
@@ -429,7 +433,8 @@ export declare class HorizontalEdgeShape implements EdgeShape {
|
|
|
429
433
|
private readonly sourceArrow;
|
|
430
434
|
private readonly targetArrow;
|
|
431
435
|
constructor(color: string, width: number, arrowLength: number, arrowWidth: number, arrowOffset: number, hasSourceArrow: boolean, hasTargetArrow: boolean, roundness: number);
|
|
432
|
-
update(
|
|
436
|
+
update(to: Point, flipX: number, flipY: number, fromDir: number, toDir: number): void;
|
|
437
|
+
private createLinePath;
|
|
433
438
|
}
|
|
434
439
|
|
|
435
440
|
declare interface HorizontalEdgeShape_2 {
|
|
@@ -557,7 +562,8 @@ export declare class StraightEdgeShape implements EdgeShape {
|
|
|
557
562
|
private readonly sourceArrow;
|
|
558
563
|
private readonly targetArrow;
|
|
559
564
|
constructor(color: string, width: number, arrowLength: number, arrowWidth: number, arrowOffset: number, hasSourceArrow: boolean, hasTargetArrow: boolean, roundness: number);
|
|
560
|
-
update(
|
|
565
|
+
update(to: Point, flipX: number, flipY: number, fromDir: number, toDir: number): void;
|
|
566
|
+
private createLinePath;
|
|
561
567
|
}
|
|
562
568
|
|
|
563
569
|
declare interface StraightEdgeShape_2 {
|
|
@@ -741,7 +747,8 @@ export declare class VerticalEdgeShape implements EdgeShape {
|
|
|
741
747
|
private readonly sourceArrow;
|
|
742
748
|
private readonly targetArrow;
|
|
743
749
|
constructor(color: string, width: number, arrowLength: number, arrowWidth: number, arrowOffset: number, hasSourceArrow: boolean, hasTargetArrow: boolean, roundness: number);
|
|
744
|
-
update(
|
|
750
|
+
update(to: Point, flipX: number, flipY: number, fromDir: number, toDir: number): void;
|
|
751
|
+
private createLinePath;
|
|
745
752
|
}
|
|
746
753
|
|
|
747
754
|
declare interface VerticalEdgeShape_2 {
|