@html-graph/html-graph 6.0.0 → 7.0.1
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/dist/html-graph.d.ts +36 -5
- package/dist/html-graph.js +1195 -1024
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/html-graph.d.ts
CHANGED
|
@@ -47,7 +47,20 @@ export declare interface AnimatedLayoutAlgorithm {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export declare interface AnimatedLayoutConfig {
|
|
50
|
-
readonly algorithm
|
|
50
|
+
readonly algorithm?: {
|
|
51
|
+
readonly type: "custom";
|
|
52
|
+
readonly instance: AnimatedLayoutAlgorithm;
|
|
53
|
+
} | {
|
|
54
|
+
readonly type?: "forceDirected";
|
|
55
|
+
readonly maxTimeDeltaSec?: number;
|
|
56
|
+
readonly nodeCharge?: number;
|
|
57
|
+
readonly nodeMass?: number;
|
|
58
|
+
readonly edgeEquilibriumLength?: number;
|
|
59
|
+
readonly edgeStiffness?: number;
|
|
60
|
+
readonly seed?: string;
|
|
61
|
+
readonly effectiveDistance?: number;
|
|
62
|
+
readonly convergenceDelta?: number;
|
|
63
|
+
} | undefined;
|
|
51
64
|
}
|
|
52
65
|
|
|
53
66
|
export declare type ArrowRenderer = (params: ArrowRenderingParams) => string;
|
|
@@ -241,6 +254,8 @@ export declare class CanvasBuilder {
|
|
|
241
254
|
private hasBackground;
|
|
242
255
|
private hasUserConnectablePorts;
|
|
243
256
|
private hasUserDraggableEdges;
|
|
257
|
+
private hasAnimatedLayout;
|
|
258
|
+
private hasLayout;
|
|
244
259
|
private readonly boxRenderingTrigger;
|
|
245
260
|
private readonly graphStore;
|
|
246
261
|
private readonly viewportStore;
|
|
@@ -285,11 +300,11 @@ export declare class CanvasBuilder {
|
|
|
285
300
|
/**
|
|
286
301
|
* enables nodes positioning with specified layout
|
|
287
302
|
*/
|
|
288
|
-
enableLayout(config
|
|
303
|
+
enableLayout(config?: LayoutConfig): CanvasBuilder;
|
|
289
304
|
/**
|
|
290
305
|
* enables animated nodes positioning with specified layout
|
|
291
306
|
*/
|
|
292
|
-
enableAnimatedLayout(config
|
|
307
|
+
enableAnimatedLayout(config?: AnimatedLayoutConfig): CanvasBuilder;
|
|
293
308
|
/**
|
|
294
309
|
* builds final canvas
|
|
295
310
|
*/
|
|
@@ -711,13 +726,29 @@ export declare interface LayoutAlgorithm {
|
|
|
711
726
|
calculateCoordinates(graph: Graph): ReadonlyMap<Identifier, Point>;
|
|
712
727
|
}
|
|
713
728
|
|
|
729
|
+
declare type LayoutAlgorithmConfig = {
|
|
730
|
+
readonly type: "custom";
|
|
731
|
+
readonly instance: LayoutAlgorithm;
|
|
732
|
+
} | {
|
|
733
|
+
readonly type: "forceDirected";
|
|
734
|
+
readonly dtSec?: number;
|
|
735
|
+
readonly maxIterations?: number;
|
|
736
|
+
readonly seed?: string;
|
|
737
|
+
readonly nodeCharge?: number;
|
|
738
|
+
readonly nodeMass?: number;
|
|
739
|
+
readonly edgeEquilibriumLength?: number;
|
|
740
|
+
readonly edgeStiffness?: number;
|
|
741
|
+
readonly effectiveDistance?: number;
|
|
742
|
+
readonly convergenceDelta?: number;
|
|
743
|
+
};
|
|
744
|
+
|
|
714
745
|
export declare type LayoutApplyOn = {
|
|
715
746
|
type: "topologyChangeTimeout";
|
|
716
747
|
} | EventSubject<void>;
|
|
717
748
|
|
|
718
749
|
export declare interface LayoutConfig {
|
|
719
|
-
readonly algorithm
|
|
720
|
-
readonly applyOn
|
|
750
|
+
readonly algorithm?: LayoutAlgorithmConfig | undefined;
|
|
751
|
+
readonly applyOn?: LayoutApplyOn | undefined;
|
|
721
752
|
}
|
|
722
753
|
|
|
723
754
|
export declare type MarkNodePortRequest = {
|