-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjsdiag.d.ts
5959 lines (5956 loc) · 270 KB
/
jsdiag.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference path="./jscommon.d.ts" />
// Type definitions for MindFusion.Diagramming for JavaScript
// Project: https://www.mindfusion.eu/javascript-diagram.html
// Definitions by: MindFusion <https://www.mindfusion.eu>
// Copyright (c) 2018-2020, MindFusion LLC - Bulgaria.
declare namespace MindFusion.Animations
{
/** Specifies the animation function used by an Animation object. */
enum AnimationType
{
/** Represents an animation that accelerates/deccelerates using a linear function. */
Linear = 0,
/** Represents an animation that accelerates/deccelerates through exponentiation formula - x^n where n can be set through the Animation's param property. The default exponent equals 2. */
Power = 1,
/** Represents an animation that accelerates/deccelerates using an exponential function. The exponent can be set through the Animation's param property. The default exponent equals 10. */
Exponential = 2,
/** Represents an animation that accelerates/deccelerates using a circular function. */
Circular = 3,
/** Represents an effect that simulates a retraction in the motion of the animation. The amplitude of the retraction can be controlled through the Animation's param property. The default param value is 1.5; */
BackBow = 4,
/** Represents a bouncing effect animation. */
Bounce = 5,
/** Represents an oscillating effect animation. The oscillation frequency can be controlled through the Animation's param property. The default param value is 0.5; */
Elastic = 6,
/** Specifies a user-set function. When this value is used the actual animation function must be set through the Animation's custom function callback. */
Custom = 7
}
/** Specifies the easing applied to an animation. */
enum EasingType
{
/** Follows the animation function associated with the Animation. */
EaseIn = 0,
/** Inverses the animation function associated with the Animation. */
EaseOut = 1,
/** Uses EaseIn for the first half the the Animation's duration and EaseOut for the second half. */
EaseInOut = 2,
/** Uses EaseOut for the first half the the Animation's duration and EaseIn for the second half. */
EaseOutIn = 3
}
/** Defines all events raised in the Animations namespace. */
class Events
{
/** Raised when an Animation is complete. */
static animationComplete: string;
}
/** Represents an object that is used to animate diagram items on the canvas. */
class Animation
{
/** Initializes a new instance of the Animation class.
* @param item The diagram item to animate.
* @param options An object used to specify various property values for the animation.
* @param onUpdateCallback A callback function called on every animation tick.
* @param onCustomFunctionCallback An object used to specify various property values for the animation.
*/
constructor(item: MindFusion.Diagramming.DiagramItem, options?: any, onUpdateCallback?: any, onCustomFunctionCallback?: any);
/** Starts or resumes the animation. */
start(): void;
/** Starts or resumes the animation. */
stop(): void;
/** Indicates whether the animation is currently running. */
isRunning(): boolean;
/** Registers a single event listener on the Animation.
* @param eventName The name of the event.
* @param handler Represents the method that will handle the event specified with eventName.
*/
addEventListener(eventName: string, handler: any): void;
/** Removes a single event listener on the Animation.
* @param eventName The name of the event.
* @param handler Represents the method that will handle the event specified with eventName.
*/
removeEventListener(eventName: string, handler: any): void;
/** Gets the duration of the animation function in milliseconds. */
getDuration(): number;
/** Sets the duration of the animation function in milliseconds. */
setDuration(value: number): void;
/** Gets the initial value of the property that will be animated. */
getFromValue(): any;
/** Sets the initial value of the property that will be animated. */
setFromValue(value: any): void;
/** Gets the target value of the property that will be animated. */
getToValue(): any;
/** Sets the target value of the property that will be animated. */
setToValue(value: any): void;
/** Gets the type of the animation. */
getAnimationType(): AnimationType;
/** Sets the type of the animation. */
setAnimationType(value: AnimationType): void;
/** Gets the easing type of the animation. */
getEasingType(): EasingType;
/** Sets the easing type of the animation. */
setEasingType(value: EasingType): void;
/** Gets the optional parameter to use in the animation function. */
getParam(): any;
/** Sets the optional parameter to use in the animation function. */
setParam(value: any): void;
/** Gets a value indicating whether to restart the animation after it completes. */
getRepeat(): boolean;
/** Sets a value indicating whether to restart the animation after it completes. */
setRepeat(value: boolean): void;
/** Gets a value indicating whether to swap the from and to values after the animation completes. */
getReverse(): boolean;
/** Sets a value indicating whether to swap the from and to values after the animation completes. */
setReverse(value: boolean): void;
/** The DiagramItem associated with this animation. */
item: MindFusion.Diagramming.DiagramItem;
}
}
declare namespace MindFusion.Graphs
{
/** Defines values that specify how automatic layout algorithms align links to anchor points. */
enum Anchoring
{
/** Anchor points are ignored. */
Ignore = 0,
/** Links are aligned to their original anchor points. */
Keep = 1,
/** Links are aligned to new anchor points, depending on the positions of graph nodes after a layout is applied. */
Reassign = 2
}
/** Specifies placement of graph connected components relatively to each other. */
enum MultipleGraphsPlacement
{
/** Indicates that subgraphs should be placed in a column. */
Vertical = 0,
/** Indicates that subgraphs should be placed in a row. */
Horizontal = 1
}
/** Specifies in what direction to place nodes processed by a layout algorithm. */
enum LayoutDirection
{
/** Indicates a top-to-bottom layout direction. */
TopToBottom = 0,
/** Indicates a left-to-right layout direction. */
LeftToRight = 1,
/** Indicates a bottom-to-top layout direction. */
BottomToTop = 2,
/** Indicates a right-to-left layout direction. */
RightToLeft = 3
}
/** Specifies general layout orientation. */
enum Orientation
{
/** Specifies vertical orientation. */
Vertical = 0,
/** Specifies horizonal orientation. */
Horizontal = 1
}
/** Specifies the shape of the diagram links after they are laid out. */
enum TreeLayoutLinkType
{
/** Indicates that links will be arranged to point to the centers of the related nodes. */
Default = 0,
/** Indicates that links will be attached to the middles of the adjoining node sides. */
Straight = 1,
/** Indicates that links will be arranged as cascading and attached to the middles of the adjoining node sides. */
Cascading = 2
}
/** Base class for automatic layout algorithms. */
class Layout
{
/** Indicates how to align links to the anchor points of nodes. */
anchoring: Anchoring;
/** Indicates whether to treat each Group of nodes as a single vertex in the arranged graph. */
keepGroupLayout: boolean;
/** Indicates how multiple independent graphs in the diagram should be positioned relatively to each other. */
multipleGraphsPlacement: MultipleGraphsPlacement;
}
/** Implements algorithms for arranging tree structures. */
class TreeLayout extends Layout
{
/** Initializes a new instance of the TreeLayout class. */
constructor();
/** The space to leave between adjacent levels of the tree. */
levelDistance: number;
/** The space to leave between adjacent nodes on the same level. */
nodeDistance: number;
/** Indicates whether to keep the root node at its original position. */
keepRootPosition: boolean;
/** The orientation of the arranged graph. */
direction: LayoutDirection;
/** The type of the links in the arranged tree. */
linkType: TreeLayoutLinkType;
/** Indicates whether the 'assistant' trait is regarded when performing the layout. */
enableAssistants: boolean;
/** Indicates whether 'assistant' nodes on the same side of a single parent are arranged as close to each other as possible. */
compactAssistants: boolean;
/** Returns a builder object, associated with this TreeLayout instance.
* @return A Builder instance.
*/
init(): TreeLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): TreeLayoutBuilder;
}
/** Implements algorithms for arranging tree structures. */
class BorderedTreeLayout extends Layout
{
/** Initializes a new instance of the BorderedTreeLayout class. */
constructor();
/** The space to leave between adjacent levels of the tree. */
levelDistance: number;
/** The space to leave between adjacent nodes on the same level. */
nodeDistance: number;
/** Indicates whether to keep the root node at its original position. */
keepRootPosition: boolean;
/** The orientation of the arranged graph. */
direction: LayoutDirection;
/** The type of the links in the arranged tree. */
linkType: TreeLayoutLinkType;
/** Returns a builder object, associated with this BorderedTreeLayout instance.
* @return A Builder instance.
*/
init(): BorderedTreeLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): BorderedTreeLayoutBuilder;
}
/** This algorithm assigns diagram nodes to distinct horizontal or vertical layers. */
class LayeredLayout extends Layout
{
/** Initializes a new instance of the LayeredLayout class. */
constructor();
/** The desired distance between layer axis lines. */
layerDistance: number;
/** The desired distance between adjacent nodes in a layer. */
nodeDistance: number;
/** The orientation of the arranged graph. */
direction: LayoutDirection;
/** The number of iterations to perform when untwining the layout. */
siftingRounds: number;
/** Returns a builder object, associated with this LayeredLayout instance.
* @return A Builder instance.
*/
init(): LayeredLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): LayeredLayoutBuilder;
}
/** Implements the Spring-Embedder graph layout algorithm. */
class SpringLayout extends Layout
{
/** Initializes a new instance of the SpringLayout class. */
constructor();
/** The desired distance between nodes. */
nodeDistance: number;
/** The number of iterations to run the layout routine. */
iterations: number;
/** Returns a builder object, associated with this SpringLayout instance.
* @return A Builder instance.
*/
init(): SpringLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): SpringLayoutBuilder;
}
/** FractalLayout is a tree layout algorithm that places child nodes symmetrically around their parent node. */
class FractalLayout extends Layout
{
/** Initializes a new instance of the FractalLayout class. */
constructor();
/** Indicates how to align links to the anchor points of nodes. */
anchoring: Anchoring;
/** Indicates whether to treat each Group of nodes as a single vertex in the arranged graph. */
keepGroupLayout: boolean;
/** Specifies the node that should be placed at the center of the tree. */
root: MindFusion.Diagramming.DiagramNode;
/** Indicates how multiple independent graphs in the diagram should be positioned relatively to each other. */
multipleGraphsPlacement: MultipleGraphsPlacement;
/** Returns a builder object, associated with this FractalLayout instance.
* @return A Builder instance.
*/
init(): FractalLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): FractalLayoutBuilder;
}
/** Performs tree-map layout on a graph. */
class TreeMapLayout extends Layout
{
/** Initializes a new instance of the TreeMapLayout class. */
constructor();
/** Indicates whether the layout should attempt to keep the dimension ratio of nodes closer to 1. */
squarify: boolean;
/** The distance between adjacent nodes. */
padding: number;
/** The padding inside containers. */
containerPadding: number;
/** The rectangle in which the layout will try to arrange nodes. */
layoutArea: MindFusion.Drawing.Rect;
/** Returns a builder object, associated with this TreeMapLayout instance.
* @return A Builder instance.
*/
init(): TreeMapLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): TreeMapLayoutBuilder;
}
/** Implements a layered graph layout algorithm.o */
class FlowchartLayout extends Layout
{
/** Initializes a new instance of the FlowchartLayout class. */
constructor();
/** Gets the distance between consecutive nodes in the flowchart. */
getNodeDistance(): number;
/** Sets the distance between consecutive nodes in the flowchart. */
setNodeDistance(value: number): void;
/** Gets a value indicating how to align links to the anchor points of nodes. */
getAnchoring(): Anchoring;
/** Sets a value indicating how to align links to the anchor points of nodes. */
setAnchoring(value: Anchoring): void;
/** Gets how much space to leave between adjacent decision branches in the flowchart. */
getBranchPadding(): number;
/** Sets how much space to leave between adjacent decision branches in the flowchart. */
setBranchPadding(value: number): void;
/** Gets how much space to leave between adjacent back links designating nested loops. */
getLinkPadding(): number;
/** Sets how much space to leave between adjacent back links designating nested loops. */
setLinkPadding(value: number): void;
/** Gets the orientation of the arranged graph. */
getOrientation(): Orientation;
/** Sets the orientation of the arranged graph. */
setOrientation(value: Orientation): void;
/** Gets a value indicating whether to treat each Group of nodes as a single vertex in the arranged graph. */
getKeepGroupLayout(): boolean;
/** Sets a value indicating whether to treat each Group of nodes as a single vertex in the arranged graph. */
setKeepGroupLayout(value: boolean): void;
/** Gets a value indicating how multiple independent graphs in the diagram should be positioned relatively to each other. */
getMultipleGraphsPlacement(): MultipleGraphsPlacement;
/** Sets a value indicating how multiple independent graphs in the diagram should be positioned relatively to each other. */
setMultipleGraphsPlacement(value: MultipleGraphsPlacement): void;
/** Returns a builder object, associated with this FlowchartLayout instance.
* @return A Builder instance.
*/
init(): FlowchartLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): FlowchartLayoutBuilder;
}
/** Applies topological ordering to the graph. */
class TopologicalLayout extends Layout
{
/** Initializes a new instance of the TopologicalLayout class. */
constructor();
/** The desired distance between adjacent nodes. */
nodeDistance: number;
/** The direction of the arranged graph. */
direction: LayoutDirection;
/** Indicates whether to bend links connecting adjacent nodes or draw them as straight lines. */
bendAdjacentLinks: boolean;
/** Returns a builder object, associated with this TopologicalLayout instance.
* @return A Builder instance.
*/
init(): TopologicalLayoutBuilder;
/** Returns a builder object.
* @return A Builder instance.
*/
static With(): TopologicalLayoutBuilder;
}
/** A builder class for the TreeLayout class. */
class TreeLayoutBuilder
{
/** Creates a new TreeLayout instance with the specified properties.
* @return A TreeLayout instance.
*/
create(): TreeLayout;
/** Sets The space to leave between adjacent levels of the tree.
* @param value
*/
levelDistance(value: number): TreeLayoutBuilder;
/** Sets The space to leave between adjacent nodes on the same level.
* @param value
*/
nodeDistance(value: number): TreeLayoutBuilder;
/** Sets Indicates whether to keep the root node at its original position.
* @param value
*/
keepRootPosition(value: boolean): TreeLayoutBuilder;
/** Sets The orientation of the arranged graph.
* @param value
*/
direction(value: LayoutDirection): TreeLayoutBuilder;
/** Sets The type of the links in the arranged tree.
* @param value
*/
linkType(value: TreeLayoutLinkType): TreeLayoutBuilder;
/** Sets Indicates whether the 'assistant' trait is regarded when performing the layout.
* @param value
*/
enableAssistants(value: boolean): TreeLayoutBuilder;
/** Sets Indicates whether 'assistant' nodes on the same side of a single parent are arranged as close to each other as possible.
* @param value
*/
compactAssistants(value: boolean): TreeLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): TreeLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): TreeLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): TreeLayoutBuilder;
}
/** A builder class for the BorderedTreeLayout class. */
class BorderedTreeLayoutBuilder
{
/** Creates a new BorderedTreeLayout instance with the specified properties.
* @return A BorderedTreeLayout instance.
*/
create(): BorderedTreeLayout;
/** Sets The space to leave between adjacent levels of the tree.
* @param value
*/
levelDistance(value: number): BorderedTreeLayoutBuilder;
/** Sets The space to leave between adjacent nodes on the same level.
* @param value
*/
nodeDistance(value: number): BorderedTreeLayoutBuilder;
/** Sets Indicates whether to keep the root node at its original position.
* @param value
*/
keepRootPosition(value: boolean): BorderedTreeLayoutBuilder;
/** Sets The orientation of the arranged graph.
* @param value
*/
direction(value: LayoutDirection): BorderedTreeLayoutBuilder;
/** Sets The type of the links in the arranged tree.
* @param value
*/
linkType(value: TreeLayoutLinkType): BorderedTreeLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): BorderedTreeLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): BorderedTreeLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): BorderedTreeLayoutBuilder;
}
/** A builder class for the LayeredLayout class. */
class LayeredLayoutBuilder
{
/** Creates a new LayeredLayout instance with the specified properties.
* @return A LayeredLayout instance.
*/
create(): LayeredLayout;
/** Sets The desired distance between layer axis lines.
* @param value
*/
layerDistance(value: number): LayeredLayoutBuilder;
/** Sets The desired distance between adjacent nodes in a layer.
* @param value
*/
nodeDistance(value: number): LayeredLayoutBuilder;
/** Sets The orientation of the arranged graph.
* @param value
*/
direction(value: LayoutDirection): LayeredLayoutBuilder;
/** Sets The number of iterations to perform when untwining the layout.
* @param value
*/
siftingRounds(value: number): LayeredLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): LayeredLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): LayeredLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): LayeredLayoutBuilder;
}
/** A builder class for the SpringLayout class. */
class SpringLayoutBuilder
{
/** Creates a new SpringLayout instance with the specified properties.
* @return A SpringLayout instance.
*/
create(): SpringLayout;
/** Sets The desired distance between nodes.
* @param value
*/
nodeDistance(value: number): SpringLayoutBuilder;
/** Sets The number of iterations to run the layout routine.
* @param value
*/
iterations(value: number): SpringLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): SpringLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): SpringLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): SpringLayoutBuilder;
}
/** A builder class for the FractalLayout class. */
class FractalLayoutBuilder
{
/** Creates a new FractalLayout instance with the specified properties.
* @return A FractalLayout instance.
*/
create(): FractalLayout;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): FractalLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): FractalLayoutBuilder;
/** Sets Specifies the node that should be placed at the center of the tree.
* @param value
*/
root(value: MindFusion.Diagramming.DiagramNode): FractalLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): FractalLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): FractalLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): FractalLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): FractalLayoutBuilder;
}
/** A builder class for the TreeMapLayout class. */
class TreeMapLayoutBuilder
{
/** Creates a new TreeMapLayout instance with the specified properties.
* @return A TreeMapLayout instance.
*/
create(): TreeMapLayout;
/** Sets Indicates whether the layout should attempt to keep the dimension ratio of nodes closer to 1.
* @param value
*/
squarify(value: boolean): TreeMapLayoutBuilder;
/** Sets The distance between adjacent nodes.
* @param value
*/
padding(value: number): TreeMapLayoutBuilder;
/** Sets The padding inside containers.
* @param value
*/
containerPadding(value: number): TreeMapLayoutBuilder;
/** Sets The rectangle in which the layout will try to arrange nodes.
* @param value
*/
layoutArea(value: MindFusion.Drawing.Rect): TreeMapLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): TreeMapLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): TreeMapLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): TreeMapLayoutBuilder;
}
/** A builder class for the FlowchartLayout class. */
class FlowchartLayoutBuilder
{
/** Creates a new FlowchartLayout instance with the specified properties.
* @return A FlowchartLayout instance.
*/
create(): FlowchartLayout;
/** Sets the distance between consecutive nodes in the flowchart.
* @param value
*/
nodeDistance(value: number): FlowchartLayoutBuilder;
/** Sets a value indicating how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): FlowchartLayoutBuilder;
/** Sets how much space to leave between adjacent decision branches in the flowchart.
* @param value
*/
branchPadding(value: number): FlowchartLayoutBuilder;
/** Sets how much space to leave between adjacent back links designating nested loops.
* @param value
*/
linkPadding(value: number): FlowchartLayoutBuilder;
/** Sets the orientation of the arranged graph.
* @param value
*/
orientation(value: Orientation): FlowchartLayoutBuilder;
/** Sets a value indicating whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): FlowchartLayoutBuilder;
/** Sets a value indicating how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): FlowchartLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): FlowchartLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): FlowchartLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): FlowchartLayoutBuilder;
}
/** A builder class for the TopologicalLayout class. */
class TopologicalLayoutBuilder
{
/** Creates a new TopologicalLayout instance with the specified properties.
* @return A TopologicalLayout instance.
*/
create(): TopologicalLayout;
/** Sets The desired distance between adjacent nodes.
* @param value
*/
nodeDistance(value: number): TopologicalLayoutBuilder;
/** Sets The direction of the arranged graph.
* @param value
*/
direction(value: LayoutDirection): TopologicalLayoutBuilder;
/** Sets Indicates whether to bend links connecting adjacent nodes or draw them as straight lines.
* @param value
*/
bendAdjacentLinks(value: boolean): TopologicalLayoutBuilder;
/** Sets Indicates how to align links to the anchor points of nodes.
* @param value
*/
anchoring(value: Anchoring): TopologicalLayoutBuilder;
/** Sets Indicates whether to treat each Group of nodes as a single vertex in the arranged graph.
* @param value
*/
keepGroupLayout(value: boolean): TopologicalLayoutBuilder;
/** Sets Indicates how multiple independent graphs in the diagram should be positioned relatively to each other.
* @param value
*/
multipleGraphsPlacement(value: MultipleGraphsPlacement): TopologicalLayoutBuilder;
}
}
declare namespace MindFusion.Diagramming
{
/** Represents an item in the diagram document. All classes representing diagram elements derive from DiagramItem. */
class DiagramItem
{
constructor(parent: Diagram);
/** Serializes this item into a JSON string.
* @return A string containing the item's JSON representation.
*/
toJson(): string;
/** Deserializes this item from a JSON string.
* @param json A string created by the toJson method.
*/
fromJson(json: string): void;
/** Loads property values from specified XML element.
* @param xmlElement An XML DOM element that contains the item's serialized content.
* @param context An object providing contextual information about the serialization process and some helper serialization methods.
*/
loadFromXml(xmlElement: any, context: XmlPersistContext): void;
/** Gets the parent diagram.
* @return Gets the Diagram this DiagramItem belongs to.
*/
getParent(): Diagram;
/** Gets the Text object instance that is used as a container for the item's text. */
getTextComponent(): MindFusion.Drawing.Text;
/** Repaints the DiagramItem. */
invalidate(): void;
/** Gets a string containing the DiagramItem's text. */
getText(): string;
/** Sets a string containing the DiagramItem's text. */
setText(value: string): void;
/** Gets a string specifying the color of the text of this item. */
getTextColor(): string;
/** Sets a string specifying the color of the text of this item. */
setTextColor(value: string): void;
/** Gets a string specifying the color of the text outline of this item. */
getTextStroke(): string;
/** Sets a string specifying the color of the text outline of this item. */
setTextStroke(value: string): void;
/** Gets the width of the text outline of this item. */
getTextStrokeThickness(): number;
/** Sets the width of the text outline of this item. */
setTextStrokeThickness(value: number): void;
/** Gets the spacing between the item boundaries and its text. */
getTextPadding(): MindFusion.Drawing.Thickness;
/** Sets the spacing between the item boundaries and its text. */
setTextPadding(value: MindFusion.Drawing.Thickness): void;
/** Gets the font used to render this item's text. */
getFont(): MindFusion.Drawing.Font;
/** Sets the font used to render this item's text. */
setFont(value: MindFusion.Drawing.Font): void;
/** Gets an object that specifies how to paint the interior of the DiagramItem. */
getBrush(): any;
/** Sets an object that specifies how to paint the interior of the DiagramItem. */
setBrush(value: any): void;
/** Gets a string specifying the color used to stroke the item's frame. */
getStroke(): string;
/** Sets a string specifying the color used to stroke the item's frame. */
setStroke(value: string): void;
/** Gets the line width applied when stroking the item's frame. */
getStrokeThickness(): number;
/** Sets the line width applied when stroking the item's frame. */
setStrokeThickness(value: number): void;
/** Gets the line dash pattern applied when stroking the item's frame. */
getStrokeDashStyle(): MindFusion.Drawing.DashStyle;
/** Sets the line dash pattern applied when stroking the item's frame. */
setStrokeDashStyle(value: MindFusion.Drawing.DashStyle): void;
/** Gets a custom value associated with this item. */
getTag(): any;
/** Sets a custom value associated with this item. */
setTag(value: any): void;
/** Gets a custom value associated with this item. */
getId(): any;
/** Sets a custom value associated with this item. */
setId(value: any): void;
/** Gets the tooltip text that should be displayed when the mouse hovers over this item. */
getTooltip(): string;
/** Sets the tooltip text that should be displayed when the mouse hovers over this item. */
setTooltip(value: string): void;
/** Gets a weight value used in layout and path-finding algorithms. */
getWeight(): number;
/** Sets a weight value used in layout and path-finding algorithms. */
setWeight(value: number): void;
/** Gets a value indicating whether the position of this item should not be changed by automatic layout methods. */
getIgnoreLayout(): boolean;
/** Sets a value indicating whether the position of this item should not be changed by automatic layout methods. */
setIgnoreLayout(value: boolean): void;
/** Gets an object containing properties of the node, used by some layout algorithms.
* @return An object containing the layout properties.
*/
getLayoutTraits(): any;
/** Gets the z-order position of the object. */
getZIndex(): number;
/** Sets the z-order position of the object. */
setZIndex(value: number): void;
/** Gets a value indicating whether a diagram item is selected. */
getSelected(): boolean;
/** Sets a value indicating whether a diagram item is selected. */
setSelected(value: boolean): void;
/** Gets the hyperlink associated with this diagram item. */
getHyperLink(): string;
/** Sets the hyperlink associated with this diagram item. */
setHyperLink(value: string): void;
/** Gets a value indicating whether this item is visible. */
getVisible(): boolean;
/** Sets a value indicating whether this item is visible. */
setVisible(value: boolean): void;
/** Gets a value indicating whether users are allowed to modify this item. */
getLocked(): boolean;
/** Sets a value indicating whether users are allowed to modify this item. */
setLocked(value: boolean): void;
/** Gets the color used to draw the shadow of this item. */
getShadowColor(): string;
/** Sets the color used to draw the shadow of this item. */
setShadowColor(value: string): void;
/** Gets the horizontal offset of the item's shadow. */
getShadowOffsetX(): number;
/** Sets the horizontal offset of the item's shadow. */
setShadowOffsetX(value: number): void;
/** Gets the vertical offset of the item's shadow. */
getShadowOffsetY(): number;
/** Sets the vertical offset of the item's shadow. */
setShadowOffsetY(value: number): void;
/** Gets the style associated with this item. */
getStyle(): Style;
/** Sets the style associated with this item. */
setStyle(value: Style): void;
/** Gets how the text should be aligned inside the ShapeNode's bounding rectangle. */
getTextAlignment(): Alignment;
/** Sets how the text should be aligned inside the ShapeNode's bounding rectangle. */
setTextAlignment(value: Alignment): void;
/** Gets how the text should be vertically aligned inside the ShapeNode's bounding rectangle. */
getLineAlignment(): Alignment;
/** Sets how the text should be vertically aligned inside the ShapeNode's bounding rectangle. */
setLineAlignment(value: Alignment): void;
/** Gets the effective font that should be used to render this item's text. */
getEffectiveFont(): MindFusion.Drawing.Font;
/** A function to call when repainting the item, to use for custom drawing. */
onUpdateVisuals: UpdateVisualsDelegate;
/** The bounds of the item. */
bounds: MindFusion.Drawing.Rect;
/** Returns the array with visual elements that are used to represent this item on the canvas. */
getGraphicsContent(): Array<any>;
/** Gets the parent container node of this item. */
getContainer(): any;
/** Gets the repaint bounding rectangle of this item. */
getRepaintBounds(): MindFusion.Drawing.Rect;
}
/** DiagramNode is an abstract base class from which the ShapeNode, TableNode and ControlNode classes derive. DiagramNode instances can represent graph vertices, nodes in organizational or flow diagrams, entities in ER diagrams, and so on. */
class DiagramNode extends DiagramItem
{
/** Initializes a new instance of the DiagramNode class.
* @param parent A Diagram instance whose default node attributes are copied to this node.
*/
constructor(parent?: Diagram);
/** Gets the incoming links collection of this node.
* @return An array containing incoming DiagramLink objects.
*/
getIncomingLinks(): Array<DiagramLink>;
/** Gets the outgoing links collection of this node.
* @return An array containing outgoing DiagramLink objects.
*/
getOutgoingLinks(): Array<DiagramLink>;
/** Gets a value indicating whether users are allowed to draw incoming links to this node. */
getAllowIncomingLinks(): boolean;
/** Sets a value indicating whether users are allowed to draw incoming links to this node. */
setAllowIncomingLinks(value: boolean): void;
/** Gets a value indicating whether users are allowed to draw outgoing links from this node. */
getAllowOutgoingLinks(): boolean;
/** Sets a value indicating whether users are allowed to draw outgoing links from this node. */
setAllowOutgoingLinks(value: boolean): void;
/** Gets the angle at which this node is rotated. */
getRotationAngle(): number;
/** Sets the angle at which this node is rotated. */
setRotationAngle(value: number): void;
/** Gets the kinds of modifications that end-users are permitted to perform on the node. */
getEnabledHandles(): AdjustmentHandles;
/** Sets the kinds of modifications that end-users are permitted to perform on the node. */
setEnabledHandles(value: AdjustmentHandles): void;
/** Gets a value indicating how the node adjustment handles behave and what do they look like. */
getHandlesStyle(): HandlesStyle;
/** Sets a value indicating how the node adjustment handles behave and what do they look like. */
setHandlesStyle(value: HandlesStyle): void;
/** Gets a value indicating whether this node is considered an obstacle by the link-routing algorithm. */
getObstacle(): boolean;
/** Sets a value indicating whether this node is considered an obstacle by the link-routing algorithm. */
setObstacle(value: boolean): void;
/** Gets a value indicating whether users are allowed to expand or collapse the tree branch that starts at this node. */
getExpandable(): boolean;
/** Sets a value indicating whether users are allowed to expand or collapse the tree branch that starts at this node. */
setExpandable(value: boolean): void;
/** Gets a value indicating whether the tree branch that starts at this node is expanded or collapsed. */
getExpanded(): boolean;
/** Sets a value indicating whether the tree branch that starts at this node is expanded or collapsed. */
setExpanded(value: boolean): void;
/** Gets the anchor points to which links are attached when connected to the node. */
getAnchorPattern(): AnchorPattern;
/** Sets the anchor points to which links are attached when connected to the node. */
setAnchorPattern(value: AnchorPattern): void;
/** Attaches this node to the specified master node so that when the master is moved, the attached node follows it.
* @param node A DiagramNode instance specifying the master node.
*/
attachTo(node: DiagramNode): void;
/** Detaches this node from its current master node. */
detach(): void;
/** Attaches the specified subordinate node to this node, so that when this node is moved, the subordinate follows it.
* @param subordinate A DiagramNode instance specifying the node that should be attached.
*/
attach(subordinate: DiagramNode): void;
/** Returns the node to which this node is attached.
* @return A DiagramNode reference specifying the node to which this node has been previously attached via the attach or attachTo method.
*/
getMasterNode(): DiagramNode;
/** Returns the nodes attached to this node.
* @return An array of nodes attached to this node via the attach or attachTo methods.
*/
getAttachedNodes(): Array<DiagramNode>;
/** Gets an array containing all effects applied to this node.
* @return An array containing all node effects.
*/
getEffects(): Array<NodeEffect>;
/** Gets a value indicating whether this node displays a delete button. */
getShowDeleteButton(): boolean;
/** Sets a value indicating whether this node displays a delete button. */
setShowDeleteButton(value: boolean): void;
/** Gets the rectangle that defines the position of the diagram node. */
getBounds(): MindFusion.Drawing.Rect;
/** Sets the rectangle that defines the position of the diagram node.
* @param value The node's bounding rectangle
* @param updateDependencies true if links and attachments must be updated too, or false otherwise.
*/
setBounds(value: MindFusion.Drawing.Rect, updateDependencies?: boolean): void;
/** Determines whether a manipulator object of this item is located at the specified point.
* @param mousePosition A Point value specifying where to look for a manipulator object.
* @return Returns a Manipulator instance representing the manipulator object found at the specified location, or null if there is none.
*/
hitTestManipulators(mousePosition: MindFusion.Drawing.Point): Manipulator;
createAnchorPointVisual(point: AnchorPoint): MindFusion.Drawing.Path;
}
/** Represents a link between two diagram nodes. */
class DiagramLink extends DiagramItem
{
/** Initializes a new instance of the DiagramLink class between the specified nodes using the specified diagram link as a prototype.
* @param parent The Diagram from which to obtain default values for the link properties.
* @param origin The origin node of the new link.
* @param destination The destination node of the new link.
*/
constructor(parent: Diagram, origin: DiagramNode, destination: DiagramNode);
/** Initializes a new instance of the DiagramLink class between the specified points using the specified diagram link as a prototype.
* @param parent The Diagram from which to obtain default values for the link properties.
* @param originPoint The origin point of the new link.
* @param destinationPoint The destination point of the new link.
*/
constructor(parent: Diagram, originPoint: MindFusion.Drawing.Point, destinationPoint: MindFusion.Drawing.Point);
/** Gets the type of link segments and how they are positioned relatively to each other. */
getShape(): LinkShape;
/** Sets the type of link segments and how they are positioned relatively to each other. */
setShape(value: LinkShape): void;
/** Gets the control points of this link. */
getControlPoints(): Array<MindFusion.Drawing.Point>;
/** Sets the control points of this link. */
setControlPoints(value: Array<MindFusion.Drawing.Point>): void;
/** Gets the link's text placement and orientation. */
getTextStyle(): LinkTextStyle;
/** Sets the link's text placement and orientation. */
setTextStyle(value: LinkTextStyle): void;
/** Gets the link's text alignment. */
getTextAlignment(): Alignment;
/** Sets the link's text alignment. */
setTextAlignment(value: Alignment): void;
/** Gets the origin node of this DiagramLink. */
getOrigin(): DiagramNode;
/** Sets the origin node of this DiagramLink. */
setOrigin(value: DiagramNode): void;
/** Gets the destination node of this DiagramLink. */
getDestination(): DiagramNode;
/** Sets the destination node of this DiagramLink. */
setDestination(value: DiagramNode): void;
/** Gets the anchor point to which a link is connected at its origin. */
getOriginAnchor(): number;
/** Sets the anchor point to which a link is connected at its origin. */
setOriginAnchor(value: number): void;
/** Gets the anchor point to which a link is connected at its destination. */
getDestinationAnchor(): number;
/** Sets the anchor point to which a link is connected at its destination. */
setDestinationAnchor(value: number): void;
/** Gets the origin table row of this DiagramLink. */
getOriginIndex(): number;
/** Sets the origin table row of this DiagramLink. */
setOriginIndex(value: number): void;
/** Gets the destination table row of this DiagramLink. */
getDestinationIndex(): number;
/** Sets the destination table row of this DiagramLink. */
setDestinationIndex(value: number): void;
/** Updates the link's internal state after the link's control points have been changed. */
updateFromPoints(): void;
/** Gets the first control point of this link. */
getStartPoint(): MindFusion.Drawing.Point;
/** Sets the first control point of this link. */
setStartPoint(value: MindFusion.Drawing.Point): void;
/** Gets the last control point of this link. */
getEndPoint(): MindFusion.Drawing.Point;
/** Sets the last control point of this link. */
setEndPoint(value: MindFusion.Drawing.Point): void;
/** Gets the shape to display at the beginning of this link. */
getBaseShape(): Shape;
/** Sets the shape to display at the beginning of this link. */
setBaseShape(value: Shape): void;
/** Gets the size of the shape displayed at the beginning of this link. */
getBaseShapeSize(): number;
/** Sets the size of the shape displayed at the beginning of this link. */
setBaseShapeSize(value: number): void;
/** Gets the shape to display at the end of this link. */
getHeadShape(): Shape;
/** Sets the shape to display at the end of this link. */
setHeadShape(value: Shape): void;
/** Gets the size of the shape displayed at the end of this link. */
getHeadShapeSize(): number;
/** Sets the size of the shape displayed at the end of this link. */
setHeadShapeSize(value: number): void;
/** Gets an object that specifies how to paint the interior of the link's base shape. */
getBaseBrush(): any;
/** Sets an object that specifies how to paint the interior of the link's base shape. */
setBaseBrush(value: any): void;
/** Gets an object that specifies how to paint the interior of the link's arrowhead shape. */
getHeadBrush(): any;
/** Sets an object that specifies how to paint the interior of the link's arrowhead shape. */