forked from NorthwoodsSoftware/GoJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphObject.html
1438 lines (1429 loc) · 373 KB
/
GraphObject.html
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
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>GraphObject | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="stylesheet" href="../assets/style-tsd.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary"><div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2"><div class="md:pl-4"><a class="text-white hover:text-white no-underline hover:no-underline\n font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html"><h1 class="my-0 p-1 leading-none">GoJS</h1></a></div><button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation"><svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6"><path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path><path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></button><div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20"><ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0"><li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></li></ul></div></div><hr class="border-b border-gray-600 opacity-50 my-0 py-0"/></nav><div class="tsd-page-header"><div class="tsd-page-toolbar"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited"/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div></div><div class="tsd-page-title"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="top-copyright"><b>GoJS</b>® Diagramming Components<br/>version 2.3.8<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class GraphObject <span class="tsd-flag ts-flagAbstract">Abstract</span> </h1></div></div></div></header><div class="tsd w-full max-w-screen-xl mx-auto pb-4"><div class="row px-2 w-full"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">GraphObject</span><ul class="tsd-hierarchy"><li><a href="Panel.html" class="tsd-signature-type" data-tsd-kind="Class">Panel</a></li><li><a href="Shape.html" class="tsd-signature-type" data-tsd-kind="Class">Shape</a></li><li><a href="TextBlock.html" class="tsd-signature-type" data-tsd-kind="Class">TextBlock</a></li><li><a href="Picture.html" class="tsd-signature-type" data-tsd-kind="Class">Picture</a></li><li><a href="Placeholder.html" class="tsd-signature-type" data-tsd-kind="Class">Placeholder</a></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography">
<p>This is the abstract base class for all graphical objects.
Classes inheriting from GraphObject include:
<a href="Shape.html">Shape</a>, <a href="TextBlock.html">TextBlock</a>, <a href="Picture.html">Picture</a>, and <a href="Panel.html">Panel</a>.
From the Panel class the <a href="Part.html">Part</a> class is derived, from which the
<a href="Node.html">Node</a> and <a href="Link.html">Link</a> classes derive.</p>
<div><p>It is very common to make use of the static function <a href="GraphObject.html#static-make">GraphObject.make</a> in order to build up
a visual tree of GraphObjects. You can see many examples of this throughout the
Introduction, starting at <a href="../../intro/buildingObjects.html">Building Objects</a>,
and the Samples, starting with <a href="../../samples/minimal.html">Minimal Sample</a>.</p>
<p>Since GraphObject is an abstract class, programmers do not create GraphObjects themselves,
but this class defines many properties used by all kinds of GraphObjects.</p>
<p>The only visual property on GraphObject is <a href="GraphObject.html#background">background</a>.
However one can control whether the GraphObject is drawn at all by setting <a href="GraphObject.html#visible">visible</a>,
or by setting <a href="GraphObject.html#opacity">opacity</a> to zero if you still want the GraphObject to occupy space.
Call the <a href="GraphObject.html#isVisibleObject">isVisibleObject</a> predicate to determine whether the object is visible and
all of its containing panels are visible.
Also, if you want to control whether any mouse or touch events "see" the GraphObject,
you can set <a href="GraphObject.html#pickable">pickable</a> to false.</p>
<p>For more information about specifying how things get drawn, see the properties on the
<a href="Shape.html">Shape</a>, <a href="TextBlock.html">TextBlock</a>, and <a href="Picture.html">Picture</a> classes.</p>
<h3>GraphObject Sizing</h3>
<p>GraphObject defines most of the properties that cause objects to size themselves differently.
The most prominent ones include:</p>
<ul>
<li>The <a href="GraphObject.html#desiredSize">desiredSize</a>, <a href="GraphObject.html#minSize">minSize</a>, and <a href="GraphObject.html#maxSize">maxSize</a> properties are used to
explicitly set or limit the size of visual elements. <a href="GraphObject.html#width">width</a> and <a href="GraphObject.html#height">height</a> are
convenience properties that set the <a href="GraphObject.html#desiredSize">desiredSize</a> width and height, respectively.</li>
<li>The <a href="GraphObject.html#angle">angle</a> and <a href="GraphObject.html#scale">scale</a> properties are used to transform visual elements.</li>
<li>The <a href="GraphObject.html#stretch">stretch</a> property determines how a GraphObject will fill its visual space,
contextually granted to it by its containing <a href="Panel.html">Panel</a>. Top-level (<a href="Part.html">Part</a>)
GraphObjects are not affected by this property because they are always granted infinite space.</li>
</ul>
<p>All GraphObjects in a Diagram are measured and then arranged by their containing <a href="Panel.html">Panel</a>s in a tree-like fashion.
After measuring and arranging, a GraphObject will have valid values for the read-only
properties <a href="GraphObject.html#naturalBounds">naturalBounds</a>, <a href="GraphObject.html#measuredBounds">measuredBounds</a>, and <a href="GraphObject.html#actualBounds">actualBounds</a>.</p>
<ul>
<li>The <a href="GraphObject.html#naturalBounds">naturalBounds</a> of a GraphObject describe its local size,
without any transformations (<a href="GraphObject.html#scale">scale</a>, <a href="GraphObject.html#angle">angle</a>) affecting it.</li>
<li>The <a href="GraphObject.html#measuredBounds">measuredBounds</a> of a GraphObject describe its size within its containing Panel.</li>
<li>The <a href="GraphObject.html#actualBounds">actualBounds</a> of a GraphObject describe its position and given size inside of its panel.
This size may be smaller than <a href="GraphObject.html#measuredBounds">measuredBounds</a>, for instance if a GraphObject with a large <a href="GraphObject.html#desiredSize">desiredSize</a>
is placed in a <a href="Panel.html">Panel</a> of a smaller <a href="GraphObject.html#desiredSize">desiredSize</a>. Smaller <a href="GraphObject.html#actualBounds">actualBounds</a> than <a href="GraphObject.html#measuredBounds">measuredBounds</a>
typically means an object will be cropped.</li>
</ul>
<p class="boxread">
See <a href="../../intro/sizing.html">the Introduction page on sizing</a>
for usage information and examples.
<h3>GraphObject Size and Position within Panel</h3>
Several GraphObject properties guide the containing <a href="Panel.html">Panel</a> for how to size and position the object within the panel.
<ul>
<li>The <a href="GraphObject.html#alignment">alignment</a> specifies where the object should be relative to some area of the panel.
For example, an alignment value of <a href="Spot.html#static-BottomRight">Spot.BottomRight</a> means that the GraphObject should be at the bottom-right corner of the panel.</li>
<li>The <a href="GraphObject.html#alignmentFocus">alignmentFocus</a> specifies precisely which point of the GraphObject should be aligned at the <a href="GraphObject.html#alignment">alignment</a> spot.</li>
<li>The <a href="GraphObject.html#column">column</a> and <a href="GraphObject.html#row">row</a> properties are only used by <a href="Panel.html#static-Table">Panel.Table</a> panels, to indicate where the GraphObject should be.</li>
<li>The <a href="GraphObject.html#columnSpan">columnSpan</a> and <a href="GraphObject.html#rowSpan">rowSpan</a> properties tell the <a href="Panel.html#static-Table">Panel.Table</a> panel how large the GraphObject should be.</li>
<li>The <a href="GraphObject.html#isPanelMain">isPanelMain</a> property indicates to some kinds of <a href="Panel.html">Panel</a>s that the GraphObject is the "primary" object
that other panel children should be measured with or positioned in.</li>
<li>The <a href="GraphObject.html#margin">margin</a> property tells the containing <a href="Panel.html">Panel</a> how much extra space to put around this GraphObject.</li>
<li>The <a href="GraphObject.html#position">position</a> property is used to determine the relative position of GraphObjects when they are elements of a <a href="Panel.html#static-Position">Panel.Position</a> panel.</li>
</ul>
<p class="boxread">
See <a href="../../intro/panels.html">the Introduction page on Panels</a>
and <a href="../../intro/tablePanels.html">Table Panels</a> for an overview of the capabilities.
<h3>Top-level GraphObjects are Parts</h3>
<p>A <a href="Part.html">Part</a> is a derived class of GraphObject representing a top-level object.
All top-level GraphObjects must be Parts, and Node, Link, Group, and Adornment derive from Part.
The position of a Part determines the point of the Part's top-left corner in document coordinates.
See also <a href="Part.html#location">Part.location</a>, which supports an way to specify the position based on a different
spot of a different element within the Part.</p>
<p>There are several read-only properties that help navigate up the visual tree.</p>
<ul>
<li><a href="GraphObject.html#panel">panel</a> returns the <a href="Panel.html">Panel</a> that directly contains this GraphObject</li>
<li><a href="GraphObject.html#part">part</a> returns the <a href="Part.html">Part</a> that this GraphObject is in, perhaps via intervening Panels;
this is frequently used in order to get to the model data, <a href="Panel.html#data">Panel.data</a></li>
<li><a href="GraphObject.html#layer">layer</a> returns the <a href="Layer.html">Layer</a> that this GraphObject's Part is in</li>
<li><a href="GraphObject.html#diagram">diagram</a> returns the <a href="Diagram.html">Diagram</a> that this GraphObject's Part's Layer is in</li>
</ul>
<p class="boxrun">
See <a href="../../samples/visualTree.html">the Visual Tree sample</a>
for a diagram displaying the visual tree of a simple diagram.
<h3>User Interaction</h3>
<p>GraphObjects have several properties enabling dynamic customizable interaction.
There are several definable functions that execute on input events: <a href="GraphObject.html#mouseDragEnter">mouseDragEnter</a>,
<a href="GraphObject.html#mouseDragLeave">mouseDragLeave</a>, <a href="GraphObject.html#mouseDrop">mouseDrop</a>, <a href="GraphObject.html#mouseEnter">mouseEnter</a>, <a href="GraphObject.html#mouseHold">mouseHold</a>,
<a href="GraphObject.html#mouseHover">mouseHover</a>, <a href="GraphObject.html#mouseLeave">mouseLeave</a>, and <a href="GraphObject.html#mouseOver">mouseOver</a>.
For example, you could define mouse enter-and-leave event handlers to modify the appearance of a link
as the mouse passes over it:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">linkTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Link</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Shape</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-4">strokeWidth:</span><span class="hl-2"> </span><span class="hl-7">2</span><span class="hl-2">, </span><span class="hl-4">stroke:</span><span class="hl-2"> </span><span class="hl-6">"gray"</span><span class="hl-2"> }, </span><span class="hl-0">// default color is "gray"</span><br/><span class="hl-2"> { </span><span class="hl-0">// here E is the InputEvent and OBJ is this Shape</span><br/><span class="hl-2"> </span><span class="hl-5">mouseEnter</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> { </span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">strokeWidth</span><span class="hl-2"> = </span><span class="hl-7">4</span><span class="hl-2">; </span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">stroke</span><span class="hl-2"> = </span><span class="hl-6">"dodgerblue"</span><span class="hl-2">; },</span><br/><span class="hl-2"> </span><span class="hl-5">mouseLeave</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> { </span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">strokeWidth</span><span class="hl-2"> = </span><span class="hl-7">2</span><span class="hl-2">; </span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">stroke</span><span class="hl-2"> = </span><span class="hl-6">"gray"</span><span class="hl-2">; }</span><br/><span class="hl-2"> }));</span>
</code></pre>
<p>There are <a href="GraphObject.html#click">click</a>, <a href="GraphObject.html#doubleClick">doubleClick</a>, and <a href="GraphObject.html#contextClick">contextClick</a> functions
that execute when a user appropriately clicks the GraphObject.
These click functions are called with the <a href="InputEvent.html">InputEvent</a> as the first argument
and this GraphObject as the second argument.
For example, you could define a click event handler on a Node that goes to another page:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">nodeTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Node</span><span class="hl-2">, </span><span class="hl-6">"Auto"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Shape</span><span class="hl-2">, </span><span class="hl-6">"RoundedRectangle"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Binding</span><span class="hl-2">(</span><span class="hl-6">"fill"</span><span class="hl-2">, </span><span class="hl-6">"color"</span><span class="hl-2">)),</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-4">name:</span><span class="hl-2"> </span><span class="hl-6">"TB"</span><span class="hl-2">, </span><span class="hl-4">margin:</span><span class="hl-2"> </span><span class="hl-7">3</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Binding</span><span class="hl-2">(</span><span class="hl-6">"text"</span><span class="hl-2">, </span><span class="hl-6">"key"</span><span class="hl-2">)),</span><br/><span class="hl-2"> { </span><span class="hl-0">// second arg will be this GraphObject, which in this case is the Node itself:</span><br/><span class="hl-2"> </span><span class="hl-5">click</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">node</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">window</span><span class="hl-2">.</span><span class="hl-5">open</span><span class="hl-2">(</span><span class="hl-6">"https://en.wikipedia.org/Wiki/"</span><span class="hl-2"> + </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-4">data</span><span class="hl-2">.</span><span class="hl-4">key</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> });</span>
</code></pre>
<p>Note: you may prefer defining <a href="DiagramEvent.html">DiagramEvent</a> listeners on the <a href="Diagram.html">Diagram</a>
rather than on individual GraphObjects. DiagramEvents also include more general events that
do not necessarily correspond to input events.</p>
<p>The properties <a href="GraphObject.html#actionCancel">actionCancel</a>, <a href="GraphObject.html#actionDown">actionDown</a>, <a href="GraphObject.html#actionMove">actionMove</a>,
and <a href="GraphObject.html#actionUp">actionUp</a> define functions to execute when the GraphObject's <a href="GraphObject.html#isActionable">isActionable</a> property
is set to true (default false). See the <a href="ActionTool.html">ActionTool</a> for more detail.</p>
<p class="boxread">
See <a href="../../intro/events.html">the Introduction page on Events</a> for a more general discussion.
<h3>GraphObjects as Ports</h3>
<p>In GoJS, <a href="Link.html">Link</a>s can only connect to elements within a <a href="Node.html">Node</a>
that are specified as "ports", and by default the only port is the Node itself.
Setting the <a href="GraphObject.html#portId">portId</a> of a GraphObject inside a Node allows that object to act as a port.
Note: the only kind of model that can save which port a link is connected with, i.e. portIds that are not an empty string,
is a <a href="GraphLinksModel.html">GraphLinksModel</a> whose <a href="GraphLinksModel.html#linkFromPortIdProperty">GraphLinksModel.linkFromPortIdProperty</a> and
<a href="GraphLinksModel.html#linkToPortIdProperty">GraphLinksModel.linkToPortIdProperty</a> have been set to name properties on the link data objects.</p>
<p>GraphObjects have several properties that are only relevant when they are acting as ports.
These port-related properties are:</p>
<ul>
<li><a href="GraphObject.html#portId">portId</a>, which must be set to a string that is unique within the <a href="Node.html">Node</a>,
in order for this GraphObject to be treated as a "port", rather than the whole node</li>
<li><a href="GraphObject.html#fromSpot">fromSpot</a> and <a href="GraphObject.html#toSpot">toSpot</a>, where a link should connect with this port</li>
<li><a href="GraphObject.html#fromEndSegmentLength">fromEndSegmentLength</a> and <a href="GraphObject.html#toEndSegmentLength">toEndSegmentLength</a>, the length of the link segment adjacent to this port</li>
<li><a href="GraphObject.html#fromShortLength">fromShortLength</a> and <a href="GraphObject.html#toShortLength">toShortLength</a>, the distance the link should terminate before touching this port</li>
<li><a href="GraphObject.html#fromLinkable">fromLinkable</a> and <a href="GraphObject.html#toLinkable">toLinkable</a>, whether the user may draw links connecting with this port</li>
<li><a href="GraphObject.html#fromLinkableDuplicates">fromLinkableDuplicates</a> and <a href="GraphObject.html#toLinkableDuplicates">toLinkableDuplicates</a>, whether the user may draw multiple links between the same pair of ports</li>
<li><a href="GraphObject.html#fromLinkableSelfNode">fromLinkableSelfNode</a> and <a href="GraphObject.html#toLinkableSelfNode">toLinkableSelfNode</a>, whether the user may draw a link between ports on the same node</li>
<li><a href="GraphObject.html#fromMaxLinks">fromMaxLinks</a> and <a href="GraphObject.html#toMaxLinks">toMaxLinks</a>, to limit the number of links connecting with this port in a particular direction</li>
</ul>
<p class="boxread">
See <a href="../../intro/ports.html">the Introduction page on ports</a>
and <a href="../../intro/links.html">link routing</a>
and <a href="../../intro/connectionPoints.html">link connection points</a>
for port usage information and examples.
<h3>GraphObjects as labels on a Link</h3>
<p>GraphObjects can also be used as "labels" on a <a href="Link.html">Link</a>.
In addition to the <a href="GraphObject.html#alignmentFocus">alignmentFocus</a> property, these properties direct a Link Panel
to position a "label" at a particular point along the route of the link, in a particular manner:</p>
<ul>
<li><a href="GraphObject.html#segmentIndex">segmentIndex</a>, which segment the label should be on</li>
<li><a href="GraphObject.html#segmentFraction">segmentFraction</a>, how far along the segment the label should be</li>
<li><a href="GraphObject.html#segmentOffset">segmentOffset</a>, where the label should be positioned relative to the segment</li>
<li><a href="GraphObject.html#segmentOrientation">segmentOrientation</a>, how the label should be rotated relative to the angle of the segment</li>
</ul>
<p class="boxread">
See <a href="../../intro/linkLabels.html">the Introduction page on link labels</a>
for examples of how to make use of labels on Links.
<h3>Interactive Behavior</h3>
<p>There are several properties that specify fairly high-level interactive behavior:</p>
<ul>
<li><a href="GraphObject.html#cursor">cursor</a>, a CSS string specifying a cursor</li>
<li><a href="GraphObject.html#contextMenu">contextMenu</a>, an <a href="Adornment.html">Adornment</a></li>
<li><a href="GraphObject.html#toolTip">toolTip</a>, an <a href="Adornment.html">Adornment</a></li>
</ul>
<p class="boxread">
For more information, please read <a href="../../intro/contextMenus.html">the Introduction page about Context Menus</a>
and <a href="../../intro/toolTips.html">the page about ToolTips</a>.
<p class="boxrun">
Also see <a href="../../samples/basic.html">the Basic sample</a>
for examples of how to show context menus and tooltips.</div></div></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="GraphObject.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#actionCancel" class="tsd-kind-icon">action<wbr/>Cancel</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#actionDown" class="tsd-kind-icon">action<wbr/>Down</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#actionMove" class="tsd-kind-icon">action<wbr/>Move</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#actionUp" class="tsd-kind-icon">action<wbr/>Up</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="GraphObject.html#actualBounds" class="tsd-kind-icon">actual<wbr/>Bounds</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#alignment" class="tsd-kind-icon">alignment</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#alignmentFocus" class="tsd-kind-icon">alignment<wbr/>Focus</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#angle" class="tsd-kind-icon">angle</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#background" class="tsd-kind-icon">background</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#click" class="tsd-kind-icon">click</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#column" class="tsd-kind-icon">column</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#columnSpan" class="tsd-kind-icon">column<wbr/>Span</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#contextClick" class="tsd-kind-icon">context<wbr/>Click</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#contextMenu" class="tsd-kind-icon">context<wbr/>Menu</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#cursor" class="tsd-kind-icon">cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#desiredSize" class="tsd-kind-icon">desired<wbr/>Size</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="GraphObject.html#diagram" class="tsd-kind-icon">diagram</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#doubleClick" class="tsd-kind-icon">double<wbr/>Click</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#enabledChanged" class="tsd-kind-icon">enabled<wbr/>Changed</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#fromEndSegmentLength" class="tsd-kind-icon">from<wbr/>End<wbr/>Segment<wbr/>Length</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#fromLinkable" class="tsd-kind-icon">from<wbr/>Linkable</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#fromLinkableDuplicates" class="tsd-kind-icon">from<wbr/>Linkable<wbr/>Duplicates</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#fromLinkableSelfNode" class="tsd-kind-icon">from<wbr/>Linkable<wbr/>Self<wbr/>Node</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#fromMaxLinks" class="tsd-kind-icon">from<wbr/>Max<wbr/>Links</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#fromShortLength" class="tsd-kind-icon">from<wbr/>Short<wbr/>Length</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#fromSpot" class="tsd-kind-icon">from<wbr/>Spot</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#height" class="tsd-kind-icon">height</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#isActionable" class="tsd-kind-icon">is<wbr/>Actionable</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#isPanelMain" class="tsd-kind-icon">is<wbr/>Panel<wbr/>Main</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="GraphObject.html#layer" class="tsd-kind-icon">layer</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#margin" class="tsd-kind-icon">margin</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#maxSize" class="tsd-kind-icon">max<wbr/>Size</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="GraphObject.html#measuredBounds" class="tsd-kind-icon">measured<wbr/>Bounds</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#minSize" class="tsd-kind-icon">min<wbr/>Size</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseDragEnter" class="tsd-kind-icon">mouse<wbr/>Drag<wbr/>Enter</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseDragLeave" class="tsd-kind-icon">mouse<wbr/>Drag<wbr/>Leave</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseDrop" class="tsd-kind-icon">mouse<wbr/>Drop</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseEnter" class="tsd-kind-icon">mouse<wbr/>Enter</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseHold" class="tsd-kind-icon">mouse<wbr/>Hold</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseHover" class="tsd-kind-icon">mouse<wbr/>Hover</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseLeave" class="tsd-kind-icon">mouse<wbr/>Leave</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#mouseOver" class="tsd-kind-icon">mouse<wbr/>Over</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#name" class="tsd-kind-icon">name</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="GraphObject.html#naturalBounds" class="tsd-kind-icon">natural<wbr/>Bounds</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#opacity" class="tsd-kind-icon">opacity</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="GraphObject.html#panel" class="tsd-kind-icon">panel</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="GraphObject.html#part" class="tsd-kind-icon">part</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#pickable" class="tsd-kind-icon">pickable</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#portId" class="tsd-kind-icon">port<wbr/>Id</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#position" class="tsd-kind-icon">position</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#row" class="tsd-kind-icon">row</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#rowSpan" class="tsd-kind-icon">row<wbr/>Span</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#scale" class="tsd-kind-icon">scale</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#segmentFraction" class="tsd-kind-icon">segment<wbr/>Fraction</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#segmentIndex" class="tsd-kind-icon">segment<wbr/>Index</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#segmentOffset" class="tsd-kind-icon">segment<wbr/>Offset</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#segmentOrientation" class="tsd-kind-icon">segment<wbr/>Orientation</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#shadowVisible" class="tsd-kind-icon">shadow<wbr/>Visible</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#stretch" class="tsd-kind-icon">stretch</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toEndSegmentLength" class="tsd-kind-icon">to<wbr/>End<wbr/>Segment<wbr/>Length</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toLinkable" class="tsd-kind-icon">to<wbr/>Linkable</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toLinkableDuplicates" class="tsd-kind-icon">to<wbr/>Linkable<wbr/>Duplicates</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toLinkableSelfNode" class="tsd-kind-icon">to<wbr/>Linkable<wbr/>Self<wbr/>Node</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toMaxLinks" class="tsd-kind-icon">to<wbr/>Max<wbr/>Links</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toShortLength" class="tsd-kind-icon">to<wbr/>Short<wbr/>Length</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toSpot" class="tsd-kind-icon">to<wbr/>Spot</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#toolTip" class="tsd-kind-icon">tool<wbr/>Tip</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#visible" class="tsd-kind-icon">visible</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="GraphObject.html#width" class="tsd-kind-icon">width</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#apply" class="tsd-kind-icon">apply</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#attach" class="tsd-kind-icon">attach</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#bind" class="tsd-kind-icon">bind</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="GraphObject.html#cloneProtected" class="tsd-kind-icon">clone<wbr/>Protected</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#copy" class="tsd-kind-icon">copy</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#findBindingPanel" class="tsd-kind-icon">find<wbr/>Binding<wbr/>Panel</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#getDocumentAngle" class="tsd-kind-icon">get<wbr/>Document<wbr/>Angle</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#getDocumentBounds" class="tsd-kind-icon">get<wbr/>Document<wbr/>Bounds</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#getDocumentPoint" class="tsd-kind-icon">get<wbr/>Document<wbr/>Point</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#getDocumentScale" class="tsd-kind-icon">get<wbr/>Document<wbr/>Scale</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#getLocalPoint" class="tsd-kind-icon">get<wbr/>Local<wbr/>Point</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#isContainedBy" class="tsd-kind-icon">is<wbr/>Contained<wbr/>By</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#isEnabledObject" class="tsd-kind-icon">is<wbr/>Enabled<wbr/>Object</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#isVisibleObject" class="tsd-kind-icon">is<wbr/>Visible<wbr/>Object</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#set" class="tsd-kind-icon">set</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#setProperties" class="tsd-kind-icon">set<wbr/>Properties</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphObject.html#trigger" class="tsd-kind-icon">trigger</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static"><a href="GraphObject.html#static-build" class="tsd-kind-icon">build</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-defineBuilder" class="tsd-kind-icon">define<wbr/>Builder</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static"><a href="GraphObject.html#static-make" class="tsd-kind-icon">make</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-takeBuilderArgument" class="tsd-kind-icon">take<wbr/>Builder<wbr/>Argument</a></li></ul></section><section class="tsd-index-section "><h3>Constants</h3><ul class="tsd-index-list"><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-Default" class="tsd-kind-icon">Default</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-Fill" class="tsd-kind-icon">Fill</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-FlipBoth" class="tsd-kind-icon">Flip<wbr/>Both</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-FlipHorizontal" class="tsd-kind-icon">Flip<wbr/>Horizontal</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-FlipVertical" class="tsd-kind-icon">Flip<wbr/>Vertical</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-Horizontal" class="tsd-kind-icon">Horizontal</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-None" class="tsd-kind-icon">None</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-Uniform" class="tsd-kind-icon">Uniform</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-UniformToFill" class="tsd-kind-icon">Uniform<wbr/>To<wbr/>Fill</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="GraphObject.html#static-Vertical" class="tsd-kind-icon">Vertical</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Graph<wbr/>Object<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This is an abstract class, so you should not use this constructor.</p>
</div><h4 class="tsd-returns-title">Returns <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="actionCancel" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> action<wbr/>Cancel<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#actionCancel" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the <a href="ActionTool.html">ActionTool</a> is cancelled and this GraphObject's <a href="GraphObject.html#isActionable">isActionable</a>
is set to true.
This property is infrequently set.
By default this property is null.</p>
<div><p>This functional property is only set on objects such as buttons, knobs, or sliders that want to handle all events,
in conjunction with <a href="ActionTool.html">ActionTool</a>, pre-empting the normal tool mechanisms.</p>
<p>The <a href="ActionTool.html">ActionTool</a> does not conduct any transaction, so if this property has a value,
the function will not be called within a transaction.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#actionDown">actionDown</a>, <a href="GraphObject.html#actionMove">actionMove</a>, <a href="GraphObject.html#actionUp">actionUp</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="actionDown" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> action<wbr/>Down<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#actionDown" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute on a mouse-down event when this GraphObject's <a href="GraphObject.html#isActionable">isActionable</a>
is set to true.
This property is infrequently set.
By default this property is null.</p>
<div><p>This functional property is only set on objects such as buttons, knobs, or sliders that want to handle all events,
in conjunction with <a href="ActionTool.html">ActionTool</a>, pre-empting the normal tool mechanisms.</p>
<p>The <a href="ActionTool.html">ActionTool</a> does not conduct any transaction, so if this property has a value,
the function will not be called within a transaction.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#actionMove">actionMove</a>, <a href="GraphObject.html#actionUp">actionUp</a>, <a href="GraphObject.html#actionCancel">actionCancel</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="actionMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> action<wbr/>Move<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#actionMove" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute on a mouse-move event when this GraphObject's <a href="GraphObject.html#isActionable">isActionable</a>
is set to true.
This property is infrequently set.
By default this property is null.</p>
<div><p>This functional property is only set on objects such as buttons, knobs, or sliders that want to handle all events,
in conjunction with <a href="ActionTool.html">ActionTool</a>, pre-empting the normal tool mechanisms.</p>
<p>The <a href="ActionTool.html">ActionTool</a> does not conduct any transaction, so if this property has a value,
the function will not be called within a transaction.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#actionDown">actionDown</a>, <a href="GraphObject.html#actionUp">actionUp</a>, <a href="GraphObject.html#actionCancel">actionCancel</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="actionUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> action<wbr/>Up<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#actionUp" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute on a mouse-up event when this GraphObject's <a href="GraphObject.html#isActionable">isActionable</a>
is set to true.
This property is infrequently set.
By default this property is null.</p>
<div><p>This functional property is only set on objects such as buttons, knobs, or sliders that want to handle all events,
in conjunction with <a href="ActionTool.html">ActionTool</a>, pre-empting the normal tool mechanisms.</p>
<p>The <a href="ActionTool.html">ActionTool</a> does not conduct any transaction, so if this property has a value,
the function will not be called within a transaction.
If you do provide a function that makes changes to the diagram or to its model,
you should do so within a transaction -- call <a href="Diagram.html#startTransaction">Diagram.startTransaction</a> and
<a href="Diagram.html#commitTransaction">Diagram.commitTransaction</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#actionDown">actionDown</a>, <a href="GraphObject.html#actionMove">actionMove</a>, <a href="GraphObject.html#actionCancel">actionCancel</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="actualBounds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> actual<wbr/>Bounds<span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><a href="#actualBounds" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the bounds of this GraphObject in container coordinates. This means that
the actualBounds are in the coordinate space of the GraphObject's <a href="Panel.html">Panel</a>,
unless this is a <a href="Part.html">Part</a>, in which case they are in
the <a href="Diagram.html">Diagram</a>'s coordinate system.</p>
<div><p>You must not modify any of the properties of the <a href="Rect.html">Rect</a> that is the value of this property.</p>
<p>If this GraphObject is a Part,
then the x and y values of the actualBounds are identical to that Part's <a href="GraphObject.html#position">position</a>,
and the width and height values of the actualBounds represent the rectangular space occupied
by the Part in <a href="Diagram.html#documentBounds">Diagram.documentBounds</a> coordinates.</p>
<p>If this GraphObject is not a top-level object (not a <a href="Part.html">Part</a>), then the actualBounds
x and y values represent that GraphObject's position within its Panel. In a Panel of type <a href="Panel.html#static-Position">Panel.Position</a>
this is identical to the GraphObject's <a href="GraphObject.html#position">position</a>, but in other cases it is dependent on
the unique workings of each Panel type. The actualBounds width and height
of a GraphObject are the final size after the <a href="GraphObject.html#scale">scale</a> and <a href="GraphObject.html#angle">angle</a> are applied.</p>
<p>It is possible for a GraphObject (be it an GraphObject or a Panel containing several more GraphObjects)
to have no containing Part, in which case these GraphObjects cannot possibly be in a Diagram.
These GraphObjects are unlikely to have real-number values for their actualBounds, as they may
never have had the chance to be measured and arranged.</p>
<p>As with all read-only properties, using this property as a binding source is unlikely to be useful.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#measuredBounds">measuredBounds</a>, <a href="GraphObject.html#desiredSize">desiredSize</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="alignment" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> alignment<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type" data-tsd-kind="Class">Spot</a><a href="#alignment" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the alignment <a href="Spot.html">Spot</a> of this GraphObject used in <a href="Panel.html">Panel</a> layouts,
to determine where in the area allocated by the panel this object should be placed.</p>
<div><p>The default value is <a href="Spot.html#static-Default">Spot.Default</a>, which lets the Panel determine the Spot using
<a href="Panel.html#defaultAlignment">Panel.defaultAlignment</a>. If that property is also <a href="Spot.html#static-Default">Spot.Default</a>,
then the alignment spot will be different depending on the Panel type.</p>
<p>The <a href="GraphObject.html#alignmentFocus">alignmentFocus</a> is often used along with this property to specify
where this object should be positioned in a Panel.</p>
<p>A <a href="Spot.html#static-Default">Spot.Default</a> is equivalent to Spot.Center in Spot, Auto, Horizontal, and Vertical panels.
For examples of alignments in different panels, see the <a href="../../intro/panels.html">Introduction page on Panels</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#alignmentFocus">alignmentFocus</a>, <a href="Panel.html#defaultAlignment">Panel.defaultAlignment</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="alignmentFocus" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> alignment<wbr/>Focus<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type" data-tsd-kind="Class">Spot</a><a href="#alignmentFocus" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the spot on this GraphObject to be used as the alignment point
in Spot and Fixed <a href="Panel.html">Panel</a>s.
Value must be of the Spot.</p>
<div><p>The default value is <a href="Spot.html#static-Default">Spot.Default</a>, which means that the Panel type can decide the effective alignment spot.</p>
<p>The <a href="GraphObject.html#alignment">alignment</a> is often used along with this property to specify
where this object should be positioned in a Panel.</p>
<p>For <a href="Panel.html#static-Graduated">Panel.Graduated</a>, the alignmentFocus spot determines the spot on a child element to be aligned with some
point along the main element.</p>
<p>When you want a link label Node to be positioned by its location spot rather than by this alignmentFocus spot,
you can set this property to <a href="Spot.html#static-None">Spot.None</a>, only on <a href="Node.html">Node</a>s.</p>
<p>For examples of alignments in different panels, see the <a href="../../intro/panels.html">Introduction page on Panels</a>.</p>
<p>WARNING: Since 2.0, for Spot Panels, the offsetX/offsetY of <a href="GraphObject.html#alignmentFocus">alignmentFocus</a> has been reversed.
The offsetX/Y now describes offset distance from the alignmentFocus point to the alignment point, rather than the opposite.
This is what it has always described when using <a href="GraphObject.html#alignmentFocus">alignmentFocus</a> with Link Labels.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Panel.html#alignmentFocusName">Panel.alignmentFocusName</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="angle" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> angle<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#angle" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the angle transform, in degrees, of this GraphObject.
Value must be a number. If the value is not between (0 <= value < 360),
it will be normalized to be in that range.
Zero is along the positive X-axis (rightwards); 90 is along the positive Y-axis (downwards).
Default is 0.</p>
<div><p>When set on a Graduated Panel's TextBlock label, this value will be be ignored if <a href="GraphObject.html#segmentOrientation">segmentOrientation</a> is not
<a href="Link.html#static-None">Link.None</a>, <a href="Link.html#static-OrientAlong">Link.OrientAlong</a>, or <a href="Link.html#static-OrientUpright">Link.OrientUpright</a>. OrientAlong and OrientUpright will use this angle
relative to the slope of the main path.</p>
<p>When set on a Link label, this value will be be ignored if <a href="GraphObject.html#segmentOrientation">segmentOrientation</a> is not <a href="Link.html#static-None">Link.None</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#scale">scale</a>, <a href="GraphObject.html#stretch">stretch</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="background" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> background<span class="tsd-signature-symbol">: </span><a href="../index.html#BrushLike" class="tsd-signature-type" data-tsd-kind="Type alias">BrushLike</a><a href="#background" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the background Brush of this GraphObject,
filling the rectangle of this object's local coordinate space.
If the object is rotated, the background will rotate with it.</p>
<div><p>The value may be either a <a href="Brush.html">Brush</a> object or a string that is a CSS color.
The default value is null -- no background is drawn.
More information about the syntax of CSS color strings is available at:
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color">CSS colors (mozilla.org)</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Shape.html#fill">Shape.fill</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="click" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> click<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#click" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user single-primary-clicks on this object.
This typically involves a mouse-down followed by a prompt mouse-up
at approximately the same position using the left (primary) mouse button.
This property is used by the <a href="ClickSelectingTool.html">ClickSelectingTool</a>
when the user clicks on a <a href="GraphObject.html">GraphObject</a>.
The function is called in addition to the <a href="DiagramEvent.html">DiagramEvent</a>
that is raised with the name <code>"ObjectSingleClicked"</code>.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>
and this <a href="GraphObject.html">GraphObject</a>.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.</p>
<p>From the second argument, <em>obj</em>, you can get to the Node or Link via the <a href="GraphObject.html#part">part</a> property.
From there you can access the bound data via the <a href="Panel.html#data">Panel.data</a> property.
So from an event handler you can get the bound data by <code>obj.part.data</code>.</p>
<p>By default this property is null.</p>
<p>Objects in Layers that are <a href="Layer.html#isTemporary">Layer.isTemporary</a> do not receive click events.
If you do want such objects to respond to clicks, set <a href="GraphObject.html#isActionable">isActionable</a> to true.</p>
<p>If you do provide a function that makes changes to the diagram or to its model,
you should do so within a transaction -- call <a href="Diagram.html#startTransaction">Diagram.startTransaction</a> and
<a href="Diagram.html#commitTransaction">Diagram.commitTransaction</a>.</p>
<p class="boxrun">
An example of a click event handler is shown in the
<a href="../../samples/arrowheads.html">Arrowheads sample</a>.</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#doubleClick">doubleClick</a>, <a href="GraphObject.html#contextClick">contextClick</a>, <a href="Diagram.html#click">Diagram.click</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="column" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> column<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#column" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the column of this GraphObject if it is in a Table <a href="Panel.html">Panel</a>.
The value must be a small non-negative integer. The default is 0.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="columnSpan" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> column<wbr/>Span<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#columnSpan" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the number of columns spanned by this GraphObject if it is in a Table <a href="Panel.html">Panel</a>.
The value must be a small positive integer. The default is 1.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="contextClick" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> context<wbr/>Click<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#contextClick" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user single-secondary-clicks on this object.
This typically involves a mouse-down followed by a prompt mouse-up
at approximately the same position using the right (secondary) mouse button.
This property is used by the <a href="ClickSelectingTool.html">ClickSelectingTool</a>
when the user clicks on a <a href="GraphObject.html">GraphObject</a>.
The function is called in addition to the <a href="DiagramEvent.html">DiagramEvent</a>
that is raised with the name <code>"ObjectContextClicked"</code>.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>
and this <a href="GraphObject.html">GraphObject</a>.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.</p>
<p>From the second argument, <em>obj</em>, you can get to the Node or Link via the <a href="GraphObject.html#part">part</a> property.
From there you can access the bound data via the <a href="Panel.html#data">Panel.data</a> property.
So from an event handler you can get the bound data by <code>obj.part.data</code>.</p>
<p>By default this property is null.</p>
<p>Objects in Layers that are <a href="Layer.html#isTemporary">Layer.isTemporary</a> do not receive click events.
If you do want such objects to respond to clicks, set <a href="GraphObject.html#isActionable">isActionable</a> to true.</p>
<p>If you do provide a function that makes changes to the diagram or to its model,
you should do so within a transaction -- call <a href="Diagram.html#startTransaction">Diagram.startTransaction</a> and
<a href="Diagram.html#commitTransaction">Diagram.commitTransaction</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#click">click</a>, <a href="GraphObject.html#doubleClick">doubleClick</a>, <a href="Diagram.html#contextClick">Diagram.contextClick</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="contextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> context<wbr/>Menu<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a><a href="#contextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This <a href="Adornment.html">Adornment</a> or <a href="HTMLInfo.html">HTMLInfo</a> is shown upon a context click on this object.
The default value is null, which means no context menu is shown.</p>
<div><p>Changing this value will not modify or remove any existing menu that is being shown for this object.</p>
<p>Context menus may also depend on having the same data binding as the adorned Part
(i.e. the same value for <a href="Panel.html#data">Panel.data</a>).</p>
<p>Context menus are not copied by <a href="GraphObject.html#copy">copy</a>, so that context menus may be shared by all instances of a template.</p>
<p>A typical context menu is implemented as an Adornment with several buttons in it.
For example, this context menu is defined in the
<a href="../../samples/dynamicPorts.html">Dynamic Port sample</a>:</p>
<pre><code class="language-js"><span class="hl-1">var</span><span class="hl-2"> </span><span class="hl-4">nodeMenu</span><span class="hl-2"> = </span><span class="hl-0">// context menu for each Node</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"ContextMenu"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuButton"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">, </span><span class="hl-6">"Add top port"</span><span class="hl-2">),</span><br/><span class="hl-2"> { </span><span class="hl-5">click</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> </span><span class="hl-5">addPort</span><span class="hl-2">(</span><span class="hl-6">"top"</span><span class="hl-2">) }),</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuButton"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">, </span><span class="hl-6">"Add left port"</span><span class="hl-2">),</span><br/><span class="hl-2"> { </span><span class="hl-5">click</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> </span><span class="hl-5">addPort</span><span class="hl-2">(</span><span class="hl-6">"left"</span><span class="hl-2">) }),</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuButton"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">, </span><span class="hl-6">"Add right port"</span><span class="hl-2">),</span><br/><span class="hl-2"> { </span><span class="hl-5">click</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> </span><span class="hl-5">addPort</span><span class="hl-2">(</span><span class="hl-6">"right"</span><span class="hl-2">) }),</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuButton"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">, </span><span class="hl-6">"Add bottom port"</span><span class="hl-2">),</span><br/><span class="hl-2"> { </span><span class="hl-5">click</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> </span><span class="hl-5">addPort</span><span class="hl-2">(</span><span class="hl-6">"bottom"</span><span class="hl-2">) }));</span>
</code></pre>
<p>and is used in the node template:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">nodeTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Node</span><span class="hl-2">, </span><span class="hl-6">"Table"</span><span class="hl-2">,</span><br/><span class="hl-2"> { . . .</span><br/><span class="hl-2"> </span><span class="hl-4">contextMenu:</span><span class="hl-2"> </span><span class="hl-4">nodeMenu</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> . . .);</span>
</code></pre>
<p>Context menus are normally positioned by <a href="ContextMenuTool.html#positionContextMenu">ContextMenuTool.positionContextMenu</a>.
However, if there is a <a href="Placeholder.html">Placeholder</a> in the context menu, the context menu (i.e. an Adornment)
will be positioned so that the Placeholder is at the same position as this adorned GraphObject.</p>
<p>The <a href="../../samples/basic.html">Basic sample</a> also shows how
to make context menu items invisible when the command is disabled.</p>
<p>Replacing this value will not modify or remove any existing context menu that is being shown for this object.</p>
<p>Read more about context menus at <a href="../../intro/contextMenus.html">Context Menus</a>.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="cursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> cursor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#cursor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the mouse cursor to use when the mouse is over this object with no mouse buttons pressed.
The value is null when no particular cursor is specified for this object;
the actual cursor is determined by any containing <a href="Panel.html">Panel</a>.</p>
<div><p>The default value is the empty string, which means the
current mouse cursor is determined by the Diagram.
Other strings should be valid CSS strings that specify a cursor.
This provides some more information about cursor syntax:
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/cursor">CSS cursors (mozilla.org)</a>.</p>
<p>Read more about cursors at <a href="Diagram.html#currentCursor">Diagram.currentCursor</a></p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Diagram.html#defaultCursor">Diagram.defaultCursor</a>, <a href="Diagram.html#currentCursor">Diagram.currentCursor</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="desiredSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> desired<wbr/>Size<span class="tsd-signature-symbol">: </span><a href="Size.html" class="tsd-signature-type" data-tsd-kind="Class">Size</a><a href="#desiredSize" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the desired size of this GraphObject in local coordinates.
Value must be of type <a href="Size.html">Size</a>.
Default is Size(NaN, NaN).
You cannot modify the width or height of the value of this property --
if you want to change the desiredSize you must set this property to a different Size.</p>
<div><p>Getting or setting <a href="GraphObject.html#width">width</a> or <a href="GraphObject.html#height">height</a> is equivalent to getting or setting the
width or height of this property.</p>
<p>The size does not include any transformation due to <a href="GraphObject.html#scale">scale</a> or <a href="GraphObject.html#angle">angle</a>,
nor any pen thickness due to <a href="Shape.html#strokeWidth">Shape.strokeWidth</a> if this is a <a href="Shape.html">Shape</a>.
If there is a containing <a href="Panel.html">Panel</a> the Panel will determine the actual size.
If the desiredSize is greater than the allowed size that the GraphObject's Panel determines,
then the GraphObject may be visually clipped. If the desiredSize does not meet the constraints
of <a href="GraphObject.html#minSize">minSize</a> and <a href="GraphObject.html#maxSize">maxSize</a>, the GraphObject will be resized to meet them.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#minSize">minSize</a>, <a href="GraphObject.html#maxSize">maxSize</a>, <a href="GraphObject.html#naturalBounds">naturalBounds</a>, <a href="GraphObject.html#measuredBounds">measuredBounds</a>, <a href="GraphObject.html#actualBounds">actualBounds</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="diagram" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> diagram<span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a><a href="#diagram" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the <a href="Diagram.html">Diagram</a> that this GraphObject is in, if it is.</p>
<div><p>This property is not settable.
Although you cannot add any plain GraphObject to a Diagram, you can call <a href="Diagram.html#add">Diagram.add</a>
to add a <a href="Part.html">Part</a> to a Diagram.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="doubleClick" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> double<wbr/>Click<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#doubleClick" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user double-primary-clicks on this object.
This typically involves a mouse-down/up/down/up in rapid succession
at approximately the same position using the left (primary) mouse button.
This property is used by the <a href="ClickSelectingTool.html">ClickSelectingTool</a>
when the user clicks on a <a href="GraphObject.html">GraphObject</a>.
The function is called in addition to the <a href="DiagramEvent.html">DiagramEvent</a>
that is raised with the name <code>"ObjectDoubleClicked"</code>.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>
and this <a href="GraphObject.html">GraphObject</a>.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.</p>
<p>From the second argument, <em>obj</em>, you can get to the Node or Link via the <a href="GraphObject.html#part">part</a> property.
From there you can access the bound data via the <a href="Panel.html#data">Panel.data</a> property.
So from an event handler you can get the bound data by <code>obj.part.data</code>.</p>
<p>By default this property is null.</p>
<p>Objects in Layers that are <a href="Layer.html#isTemporary">Layer.isTemporary</a> do not receive click events.
If you do want such objects to respond to clicks, set <a href="GraphObject.html#isActionable">isActionable</a> to true.</p>
<p>If you do provide a function that makes changes to the diagram or to its model,
you should do so within a transaction -- call <a href="Diagram.html#startTransaction">Diagram.startTransaction</a> and
<a href="Diagram.html#commitTransaction">Diagram.commitTransaction</a>.</p>
<p>The <a href="../../samples/classHierarchy.html">Class Hierarchy sample</a>
demonstrates the definition of a double-click event handler that opens up
a web page with the documentation for that class:</p>
<pre><code class="language-js"><span class="hl-4">diagram</span><span class="hl-2">.</span><span class="hl-4">nodeTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Node</span><span class="hl-2">, . . .,</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">doubleClick:</span><span class="hl-2"> </span><span class="hl-0">// here the second argument is this object, which is this Node</span><br/><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">node</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> { </span><span class="hl-4">window</span><span class="hl-2">.</span><span class="hl-5">open</span><span class="hl-2">(</span><span class="hl-6">"../api/symbols/"</span><span class="hl-2"> + </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-4">data</span><span class="hl-2">.</span><span class="hl-4">key</span><span class="hl-2"> + </span><span class="hl-6">".html"</span><span class="hl-2">); }</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> . . .</span><br/><span class="hl-2"> );</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#click">click</a>, <a href="GraphObject.html#contextClick">contextClick</a>, <a href="Diagram.html#doubleClick">Diagram.doubleClick</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="enabledChanged" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> enabled<wbr/>Changed<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, enabled<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#enabledChanged" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when some containing Panel changes the value of <a href="Panel.html#isEnabled">Panel.isEnabled</a>.
It is typically used to modify the appearance of the object.
This function must not change the value of any panel <a href="Panel.html#isEnabled">Panel.isEnabled</a>.</p>
<div><p>If this property value is a function, it is called with two arguments,
this <a href="GraphObject.html">GraphObject</a> and the new value.
By default this property is null -- no function is called.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#isEnabledObject">isEnabledObject</a>, <a href="Panel.html#isEnabled">Panel.isEnabled</a></p>
</dd><dt class="">since</dt><dd><p>1.7</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fromEndSegmentLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> from<wbr/>End<wbr/>Segment<wbr/>Length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#fromEndSegmentLength" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the length of the first segment of a link coming from this port.
This value is used when the computed "from spot" is not <a href="Spot.html#static-None">Spot.None</a>.
The default value is 10.
This value also limits how short the <a href="Link.html#fromShortLength">Link.fromShortLength</a> may be drawn.</p>
<div><p>The value of <a href="Link.html#fromEndSegmentLength">Link.fromEndSegmentLength</a>, if not NaN, takes precedence over the value at this port
when determining the route of the link.</p>
<p>For examples of how to use this property, see <a href="../../intro/links.html#EndSegmentLengths">Link End Segment Lengths</a>.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Link.html#fromEndSegmentLength">Link.fromEndSegmentLength</a>, <a href="Link.html#computeEndSegmentLength">Link.computeEndSegmentLength</a>, <a href="GraphObject.html#toEndSegmentLength">toEndSegmentLength</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fromLinkable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> from<wbr/>Linkable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#fromLinkable" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may draw Links from this port.
This property is used by <a href="LinkingBaseTool.html#isValidFrom">LinkingBaseTool.isValidFrom</a>.</p>
<div><p>The default value is null, which indicates that the real value is inherited from
the parent <a href="Panel.html">Panel</a>, or false if there is no containing panel.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node,
or unless you are disabling the "linkability" of a particular GraphObject
inside a Panel whose fromLinkable has been set or bound to true.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#toLinkable">toLinkable</a>, <a href="GraphObject.html#fromMaxLinks">fromMaxLinks</a>, <a href="GraphObject.html#portId">portId</a>, <a href="GraphObject.html#cursor">cursor</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fromLinkableDuplicates" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> from<wbr/>Linkable<wbr/>Duplicates<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#fromLinkableDuplicates" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may draw duplicate Links from this port.
This property is used by <a href="LinkingBaseTool.html#isValidLink">LinkingBaseTool.isValidLink</a>.
The default value is false.</p>
<div><p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#fromLinkable">fromLinkable</a>, <a href="GraphObject.html#fromLinkableSelfNode">fromLinkableSelfNode</a>, <a href="GraphObject.html#toLinkableDuplicates">toLinkableDuplicates</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fromLinkableSelfNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> from<wbr/>Linkable<wbr/>Self<wbr/>Node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#fromLinkableSelfNode" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may draw Links that connect from this port's Node.
This property is used by <a href="LinkingBaseTool.html#isValidLink">LinkingBaseTool.isValidLink</a>.
The default value is false.</p>
<div><p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#fromLinkable">fromLinkable</a>, <a href="GraphObject.html#fromLinkableDuplicates">fromLinkableDuplicates</a>, <a href="GraphObject.html#toLinkableSelfNode">toLinkableSelfNode</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fromMaxLinks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> from<wbr/>Max<wbr/>Links<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#fromMaxLinks" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the maximum number of links that may come out of this port.
This property is used by <a href="LinkingBaseTool.html#isValidFrom">LinkingBaseTool.isValidFrom</a>.</p>
<div><p>The value must be non-negative.
The default value is Infinity.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#fromLinkable">fromLinkable</a>, <a href="GraphObject.html#toMaxLinks">toMaxLinks</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fromShortLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> from<wbr/>Short<wbr/>Length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#fromShortLength" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets how far the end segment of a link coming from this port stops short of the actual port.
Positive values are limited by the <a href="GraphObject.html#fromEndSegmentLength">fromEndSegmentLength</a> or <a href="Link.html#fromEndSegmentLength">Link.fromEndSegmentLength</a>.
Negative values cause the link to extend into the port.
The default value is zero.</p>
<div><p>This property is useful when you have a thick link and a pointy arrowhead.
Normally the link Shape extends all the way to the end of the arrowhead.
If the link Shape is wide, its edges will be seen behind the arrowhead.
By setting this property to a small positive value, the link Shape can end within the
body of the arrowhead, leaving only the point of the arrowhead visible at the end of the link.</p>
<p>A negative value for this property can also be useful when you want the link Shape to continue
into the port, perhaps because a portion of the port is transparent and you want the link to
appear to connect visually with a different point on the node.</p>
<p>The value of <a href="Link.html#fromShortLength">Link.fromShortLength</a>, if not NaN, takes precedence over the value at this port
when determining the route of the link.</p>
<p>For examples of how to use this property, see <a href="../../intro/connectionPoints.html">Link Connection Points</a>.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#toShortLength">toShortLength</a>, <a href="Link.html#fromShortLength">Link.fromShortLength</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fromSpot" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> from<wbr/>Spot<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type" data-tsd-kind="Class">Spot</a><a href="#fromSpot" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets where a link should connect from this port.
The default value is <a href="Spot.html#static-None">Spot.None</a>, meaning that the link routing
must consider the shape of the port and connect at the closest point.</p>
<div><p>The value of <a href="Link.html#fromSpot">Link.fromSpot</a>, if not <a href="Spot.html#static-Default">Spot.Default</a>, takes precedence over the value at this port
when determining the route of the link.
A number of the predefined <a href="Layout.html">Layout</a>s automatically set <a href="Link.html#fromSpot">Link.fromSpot</a> and <a href="Link.html#toSpot">Link.toSpot</a>,
thereby causing this property and <a href="GraphObject.html#toSpot">toSpot</a> on the port element to be ignored.
Depending on the layout, you may be able to disable that behavior, such as by setting <a href="ForceDirectedLayout.html#setsPortSpots">ForceDirectedLayout.setsPortSpots</a>,
<a href="TreeLayout.html#setsPortSpot">TreeLayout.setsPortSpot</a>, <a href="TreeLayout.html#setsChildPortSpot">TreeLayout.setsChildPortSpot</a>, or <a href="LayeredDigraphLayout.html#setsPortSpots">LayeredDigraphLayout.setsPortSpots</a> to false.</p>
<p>For examples of how to use this property, see <a href="../../intro/connectionPoints.html">Link Connection Points</a>.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Link.html#fromSpot">Link.fromSpot</a>, <a href="Link.html#computeSpot">Link.computeSpot</a>, <a href="GraphObject.html#toSpot">toSpot</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="height" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#height" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the desired height of this GraphObject in local coordinates.
This just gets or sets the height component of the <a href="GraphObject.html#desiredSize">desiredSize</a>.
Default is NaN.</p>
<div><p>Size can also be constrained by setting <a href="GraphObject.html#minSize">minSize</a> and <a href="GraphObject.html#maxSize">maxSize</a>.</p>
<p>The height does not include any transformation due to <a href="GraphObject.html#scale">scale</a> or <a href="GraphObject.html#angle">angle</a>,
nor any pen thickness due to <a href="Shape.html#strokeWidth">Shape.strokeWidth</a> if this is a <a href="Shape.html">Shape</a>.
If there is a containing <a href="Panel.html">Panel</a> the Panel will determine the actual size.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isActionable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Actionable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isActionable" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This property determines whether or not this GraphObject's events occur
before all other events, including selection. This enables the <a href="GraphObject.html#actionDown">actionDown</a>,
<a href="GraphObject.html#actionMove">actionMove</a>, <a href="GraphObject.html#actionUp">actionUp</a>, and <a href="GraphObject.html#actionCancel">actionCancel</a> events,
which are all handled by the <a href="ActionTool.html">ActionTool</a>.</p>
<div><p>This object does not get any mouse/touch events if it is not <a href="GraphObject.html#visible">visible</a>
or if it is not <a href="GraphObject.html#pickable">pickable</a>.</p>
<p>This property is infrequently used -- typically only when implementing objects
that act as buttons or knobs or sliders.
The default value is false.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#actionDown">actionDown</a>, <a href="GraphObject.html#actionMove">actionMove</a>, <a href="GraphObject.html#actionUp">actionUp</a>, <a href="GraphObject.html#actionCancel">actionCancel</a>, <a href="GraphObject.html#pickable">pickable</a>, <a href="Panel.html#isEnabled">Panel.isEnabled</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isPanelMain" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Panel<wbr/>Main<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isPanelMain" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether a GraphObject is the "main" object for some types of <a href="Panel.html">Panel</a>.
Panels that use a "main" object include <a href="Panel.html#static-Auto">Panel.Auto</a>, <a href="Panel.html#static-Spot">Panel.Spot</a>, and <a href="Panel.html#static-Link">Panel.Link</a>.</p>
<div><p>Panels that use a "main" object will use the first object that has this property set to true,
or else just the first object, if none have the property set.</p>
<p>Do not modify this property once this object is an element of a panel.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="layer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> layer<span class="tsd-signature-symbol">: </span><a href="Layer.html" class="tsd-signature-type" data-tsd-kind="Class">Layer</a><a href="#layer" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the GraphObject's containing <a href="Layer.html">Layer</a>, if there is any.
A plain GraphObject cannot belong directly to a Layer -- only a <a href="Part.html">Part</a> can belong directly to a Layer.</p>
<div><p>This property is not settable.
Normally one changes which Layer that a GraphObject is in by setting <a href="Part.html#layerName">Part.layerName</a>.
Adding a Part to a Diagram will automatically add that Part to a Layer in that Diagram based on the layerName.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="margin" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> margin<span class="tsd-signature-symbol">: </span><a href="../index.html#MarginLike" class="tsd-signature-type" data-tsd-kind="Type alias">MarginLike</a><a href="#margin" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the size of empty area around this GraphObject, as a <a href="Margin.html">Margin</a>,
in the containing <a href="Panel.html">Panel</a> coordinates.</p>
<div><p>Negative values are permitted but may cause overlaps with adjacent
objects in a <a href="Panel.html">Panel</a>.
You cannot modify the top or left or right or bottom of the value of this property --
if you want to change the margin you must set this property to a different Margin.
Default margin is <code>Margin(0,0,0,0)</code>.</p>
<p>For most uses, increasing a margin will increase the space this GraphObject takes in its containing panel.
When an object has a <a href="GraphObject.html#stretch">GraphObject.stretch</a> value applied, margins may decrease the size of that object.</p>
<p>The property setter accepts a number instead of a Margin object: providing a
number <code>N</code> will result in using a <code>Margin(N, N, N, N)</code>.
The property getter will always return a Margin.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#desiredSize">desiredSize</a>, <a href="GraphObject.html#measuredBounds">measuredBounds</a>, <a href="GraphObject.html#actualBounds">actualBounds</a>, <a href="Panel.html#padding">Panel.padding</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="maxSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> max<wbr/>Size<span class="tsd-signature-symbol">: </span><a href="Size.html" class="tsd-signature-type" data-tsd-kind="Class">Size</a><a href="#maxSize" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the maximum size of this GraphObject in container coordinates
(either a <a href="Panel.html">Panel</a> or the document).
Any new value must be of type Size; NaN values are treated as Infinity. If you want no maximum width or height, use NaN or Infinity.</p>
<div><p>You cannot modify the width or height of the value of this property --
if you want to change the maxSize you must set this property to a different Size.
The default value is Infinity by Infinity.
A containing Panel will determine the actual size of this object.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#minSize">minSize</a>, <a href="GraphObject.html#desiredSize">desiredSize</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="measuredBounds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> measured<wbr/>Bounds<span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><a href="#measuredBounds" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the measuredBounds of the GraphObject in container coordinates
(either a <a href="Panel.html">Panel</a> or the document).
This describes the transformed bounds with margins excluded.</p>
<div><p>You must not modify any of the properties of the <a href="Rect.html">Rect</a> that is the value of this property.</p>
<p>As with all read-only properties, using this property as a binding source is unlikely to be useful.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#naturalBounds">naturalBounds</a>, <a href="GraphObject.html#desiredSize">desiredSize</a>, <a href="GraphObject.html#actualBounds">actualBounds</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="minSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> min<wbr/>Size<span class="tsd-signature-symbol">: </span><a href="Size.html" class="tsd-signature-type" data-tsd-kind="Class">Size</a><a href="#minSize" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the minimum size of this GraphObject in container coordinates
(either a <a href="Panel.html">Panel</a> or the document).
Any new value must be of type Size; NaN values are treated as 0.</p>
<div><p>You cannot modify the width or height of the value of this property --
if you want to change the minSize you must set this property to a different Size.
The default value is zero by zero.
A containing Panel will determine the actual size of this object.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#maxSize">maxSize</a>, <a href="GraphObject.html#desiredSize">desiredSize</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseDragEnter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Drag<wbr/>Enter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, prevObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseDragEnter" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user moves the mouse
into this stationary object during a <a href="DraggingTool.html">DraggingTool</a> drag;
this allows you to provide feedback during a drag based on where it might drop.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>,
this <a href="GraphObject.html">GraphObject</a>, and any previous <a href="GraphObject.html">GraphObject</a>.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.
By default this property is null.</p>
<p>Note that for a drag-and-drop that originates in a different diagram, the target diagram's
selection collection will not be the parts that are being dragged.
Instead the temporary parts being dragged can be found as the source diagram's <a href="DraggingTool.html#copiedParts">DraggingTool.copiedParts</a>.</p>
<p>This function is called with <a href="Diagram.html#skipsUndoManager">Diagram.skipsUndoManager</a> temporarily set to true,
so that any changes to <a href="GraphObject.html">GraphObject</a>s are not recorded in the <a href="UndoManager.html">UndoManager</a>.
You do not need to start and commit any transaction in this function,
because the <a href="DraggingTool.html">DraggingTool</a> will be conducting one already.
After calling this function the diagram will be updated immediately.</p>
<p>For an example of a mouseDragEnter event handler, see the node template in the
<a href="../../samples/orgChartEditor.html">Org Chart Editor sample</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseDragLeave">mouseDragLeave</a>, <a href="GraphObject.html#mouseHold">mouseHold</a>, <a href="GraphObject.html#mouseDrop">mouseDrop</a>, <a href="GraphObject.html#mouseEnter">mouseEnter</a>, <a href="Group.html#handlesDragDropForMembers">Group.handlesDragDropForMembers</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseDragLeave" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Drag<wbr/>Leave<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, nextObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseDragLeave" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user moves the mouse
out of this stationary object during a <a href="DraggingTool.html">DraggingTool</a> drag;
this allows you to provide feedback during a drag based on where it might drop.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>,
this <a href="GraphObject.html">GraphObject</a>, and any new <a href="GraphObject.html">GraphObject</a> that the mouse is in.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.
By default this property is null.</p>
<p>Note that for a drag-and-drop that originates in a different diagram, the target diagram's
selection collection will not be the parts that are being dragged.
Instead the temporary parts being dragged can be found as the source diagram's <a href="DraggingTool.html#copiedParts">DraggingTool.copiedParts</a>.</p>
<p>This function is called with <a href="Diagram.html#skipsUndoManager">Diagram.skipsUndoManager</a> temporarily set to true,
so that any changes to <a href="GraphObject.html">GraphObject</a>s are not recorded in the <a href="UndoManager.html">UndoManager</a>.
You do not need to start and commit any transaction in this function,
because the <a href="DraggingTool.html">DraggingTool</a> will be conducting one already.
After calling this function the diagram will be updated immediately.</p>
<p>For an example of a mouseDragLeave event handler, see the node template in the
<a href="../../samples/orgChartEditor.html">Org Chart Editor sample</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseDragEnter">mouseDragEnter</a>, <a href="GraphObject.html#mouseHold">mouseHold</a>, <a href="GraphObject.html#mouseDrop">mouseDrop</a>, <a href="GraphObject.html#mouseLeave">mouseLeave</a>, <a href="Group.html#handlesDragDropForMembers">Group.handlesDragDropForMembers</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseDrop" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Drop<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseDrop" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when a user drops the selection on this object
at the end of a <a href="DraggingTool.html">DraggingTool</a> drag;
this allows you to customize the behavior when a drop occurs on an object.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>,
this <a href="GraphObject.html">GraphObject</a>.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.
The function is called within the transaction performed by the <a href="DraggingTool.html">DraggingTool</a>,
so you do not need to conduct one.
By default this property is null.</p>
<p>For an example of a mouseDrop event handler, see the node template in the
<a href="../../samples/orgChartEditor.html">Org Chart Editor sample</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseDragEnter">mouseDragEnter</a>, <a href="GraphObject.html#mouseDragLeave">mouseDragLeave</a>, <a href="GraphObject.html#mouseHold">mouseHold</a>, <a href="Group.html#handlesDragDropForMembers">Group.handlesDragDropForMembers</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseEnter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Enter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, prevObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseEnter" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user moves the mouse
into this object without holding down any buttons.
This property is used by the <a href="ToolManager.html">ToolManager</a>.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>,
this <a href="GraphObject.html">GraphObject</a> that the mouse is now in,
and any previous <a href="GraphObject.html">GraphObject</a> that the mouse was in.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.
By default this property is null.</p>
<p>This function is called with <a href="Diagram.html#skipsUndoManager">Diagram.skipsUndoManager</a> temporarily set to true,
so that any changes to <a href="GraphObject.html">GraphObject</a>s are not recorded in the <a href="UndoManager.html">UndoManager</a>.
You do not need to start and commit any transaction in this function.
After calling this function the diagram will be updated immediately.</p>
<p>For example, consider the situation where one wants to display buttons that the user can click
whenever the user passes the mouse over a node, and the buttons automatically disappear when the
mouse leaves the node. This can be implemented by showing an Adornment holding the buttons.</p>
<pre><code class="language-js"><span class="hl-1">var</span><span class="hl-2"> </span><span class="hl-4">nodeContextMenu</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Adornment</span><span class="hl-2">, </span><span class="hl-6">"Spot"</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-4">background:</span><span class="hl-2"> </span><span class="hl-6">"transparent"</span><span class="hl-2"> }, </span><span class="hl-0">// to help detect when the mouse leaves the area</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Placeholder</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Panel</span><span class="hl-2">, </span><span class="hl-6">"Vertical"</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-4">alignment:</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Spot</span><span class="hl-2">.</span><span class="hl-4">Right</span><span class="hl-2">, </span><span class="hl-4">alignmentFocus:</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Spot</span><span class="hl-2">.</span><span class="hl-4">Left</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"Button"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">, </span><span class="hl-6">"Command 1"</span><span class="hl-2">),</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">click</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">var</span><span class="hl-2"> </span><span class="hl-4">node</span><span class="hl-2"> = </span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">part</span><span class="hl-2">.</span><span class="hl-4">adornedPart</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">alert</span><span class="hl-2">(</span><span class="hl-6">"Command 1 on "</span><span class="hl-2"> + </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-4">data</span><span class="hl-2">.</span><span class="hl-4">text</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-5">removeAdornment</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuOver"</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }),</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"Button"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">, </span><span class="hl-6">"Command 2"</span><span class="hl-2">),</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">click</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">var</span><span class="hl-2"> </span><span class="hl-4">node</span><span class="hl-2"> = </span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">part</span><span class="hl-2">.</span><span class="hl-4">adornedPart</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">alert</span><span class="hl-2">(</span><span class="hl-6">"Command 2 on "</span><span class="hl-2"> + </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-4">data</span><span class="hl-2">.</span><span class="hl-4">text</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-5">removeAdornment</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuOver"</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> })</span><br/><span class="hl-2"> ));</span>
</code></pre>
<p>Then in the definition of the Node we can implement a mouseEnter event handler:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">nodeTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Node</span><span class="hl-2">,</span><br/><span class="hl-2"> . . .</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">mouseEnter</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">node</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">nodeContextMenu</span><span class="hl-2">.</span><span class="hl-4">adornedObject</span><span class="hl-2"> = </span><span class="hl-4">node</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-4">nodeContextMenu</span><span class="hl-2">.</span><span class="hl-5">mouseLeave</span><span class="hl-2"> = (</span><span class="hl-4">ev</span><span class="hl-2">, </span><span class="hl-4">cm</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-5">removeAdornment</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuOver"</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> </span><span class="hl-4">node</span><span class="hl-2">.</span><span class="hl-5">addAdornment</span><span class="hl-2">(</span><span class="hl-6">"ContextMenuOver"</span><span class="hl-2">, </span><span class="hl-4">nodeContextMenu</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> });</span>
</code></pre>
<p>Note how it automatically defines a <a href="GraphObject.html#mouseLeave">mouseLeave</a> event handler too.
The context menu Adornment is removed either when the mouse leaves the area of the Adornment
or when the user executes a button click event handler.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseLeave">mouseLeave</a>, <a href="GraphObject.html#mouseOver">mouseOver</a>, <a href="GraphObject.html#mouseHover">mouseHover</a>, <a href="GraphObject.html#mouseDragEnter">mouseDragEnter</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseHold" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Hold<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseHold" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user holds the mouse still for a while
over this object while holding down a button.
This property is used by the <a href="ToolManager.html">ToolManager</a>.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>.
By default this property is null.</p>
<p>If you do provide a function that makes changes to the diagram or to its model,
you should do so within a transaction -- call <a href="Diagram.html#startTransaction">Diagram.startTransaction</a> and
<a href="Diagram.html#commitTransaction">Diagram.commitTransaction</a>.</p>
<p>You can control how long the user must wait during a drag with a motionless mouse before
a "mouse hold" event occurs, by setting <a href="ToolManager.html#holdDelay">ToolManager.holdDelay</a>.
For example:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2"> = </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Diagram</span><span class="hl-2">(</span><span class="hl-6">"myDiagramDiv"</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-6">"toolManager.holdDelay"</span><span class="hl-4">:</span><span class="hl-2"> </span><span class="hl-7">500</span><span class="hl-2"> }); </span><span class="hl-0">// 500 milliseconds</span>
</code></pre>
<p>or:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-4">holdDelay</span><span class="hl-2"> = </span><span class="hl-7">500</span><span class="hl-2">; </span><span class="hl-0">// 500 milliseconds</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseDragEnter">mouseDragEnter</a>, <a href="GraphObject.html#mouseDragLeave">mouseDragLeave</a>, <a href="GraphObject.html#mouseHover">mouseHover</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseHover" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Hover<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseHover" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user holds the mouse still for a while
over this object without holding down any buttons.
This property is used by the <a href="ToolManager.html">ToolManager</a>.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>.
By default this property is null.</p>
<p>If you do provide a function that makes changes to the diagram or to its model,
you should do so within a transaction -- call <a href="Diagram.html#startTransaction">Diagram.startTransaction</a> and
<a href="Diagram.html#commitTransaction">Diagram.commitTransaction</a>.</p>
<p>You can control how long the user must wait with a motionless mouse before
a "mouse hover" event occurs, by setting <a href="ToolManager.html#hoverDelay">ToolManager.hoverDelay</a>.
For example:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2"> = </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Diagram</span><span class="hl-2">(</span><span class="hl-6">"myDiagramDiv"</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-6">"toolManager.hoverDelay"</span><span class="hl-4">:</span><span class="hl-2"> </span><span class="hl-7">500</span><span class="hl-2"> }); </span><span class="hl-0">// 500 milliseconds</span>
</code></pre>
<p>or:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-4">hoverDelay</span><span class="hl-2"> = </span><span class="hl-7">500</span><span class="hl-2">; </span><span class="hl-0">// 500 milliseconds</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseOver">mouseOver</a>, <a href="GraphObject.html#mouseEnter">mouseEnter</a>, <a href="GraphObject.html#mouseLeave">mouseLeave</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseLeave" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Leave<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, nextObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseLeave" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user moves the mouse
out of this object without holding down any buttons.
This property is used by the <a href="ToolManager.html">ToolManager</a>.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>,
this <a href="GraphObject.html">GraphObject</a> that the mouse has left,
and any next <a href="GraphObject.html">GraphObject</a> that the mouse is now in.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.
By default this property is null.</p>
<p>This function is called with <a href="Diagram.html#skipsUndoManager">Diagram.skipsUndoManager</a> temporarily set to true,
so that any changes to <a href="GraphObject.html">GraphObject</a>s are not recorded in the <a href="UndoManager.html">UndoManager</a>.
You do not need to start and commit any transaction in this function.
After calling this function the diagram will be updated immediately.</p>
<p>For example, the <a href="../../samples/flowchart.html">Flow Chart sample</a>
automatically shows and hides the ports as the mouse passes over a node.
The node template includes the following settings:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">nodeTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Node</span><span class="hl-2">,</span><br/><span class="hl-2"> . . .</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> . . .</span><br/><span class="hl-2"> </span><span class="hl-0">// handle mouse enter/leave events to show/hide the ports</span><br/><span class="hl-2"> </span><span class="hl-5">mouseEnter</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> </span><span class="hl-5">showPorts</span><span class="hl-2">(</span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">part</span><span class="hl-2">, </span><span class="hl-1">true</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-5">mouseLeave</span><span class="hl-4">:</span><span class="hl-2"> (</span><span class="hl-4">e</span><span class="hl-2">, </span><span class="hl-4">obj</span><span class="hl-2">) </span><span class="hl-1">=></span><span class="hl-2"> </span><span class="hl-5">showPorts</span><span class="hl-2">(</span><span class="hl-4">obj</span><span class="hl-2">.</span><span class="hl-4">part</span><span class="hl-2">, </span><span class="hl-1">false</span><span class="hl-2">)</span><br/><span class="hl-2"> . . .</span><br/><span class="hl-2"> });</span>
</code></pre>
<p>where the <code>showPorts</code> function is defined to set the <a href="GraphObject.html#visible">visible</a>
property of each of the port elements of the node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseEnter">mouseEnter</a>, <a href="GraphObject.html#mouseOver">mouseOver</a>, <a href="GraphObject.html#mouseHover">mouseHover</a>, <a href="GraphObject.html#mouseDragLeave">mouseDragLeave</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="mouseOver" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> mouse<wbr/>Over<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InputEvent</a>, thisObj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><a href="#mouseOver" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the function to execute when the user moves the mouse
over this object without holding down any buttons.
This property is used by the <a href="ToolManager.html">ToolManager</a>.
This property is infrequently used -- it is more common to implement <a href="GraphObject.html#mouseEnter">mouseEnter</a>
and <a href="GraphObject.html#mouseLeave">mouseLeave</a> functions.</p>
<div><p>If this property value is a function, it is called with an <a href="InputEvent.html">InputEvent</a>
and this <a href="GraphObject.html">GraphObject</a>.
The <a href="InputEvent.html#targetObject">InputEvent.targetObject</a> provides the GraphObject that was found
at the mouse point before looking up the visual tree of <a href="GraphObject.html#panel">GraphObject.panel</a>s
to get to this object.
By default this property is null.</p>
<p>This function is called with <a href="Diagram.html#skipsUndoManager">Diagram.skipsUndoManager</a> temporarily set to true,
so that any changes to <a href="GraphObject.html">GraphObject</a>s are not recorded in the <a href="UndoManager.html">UndoManager</a>.
You do not need to start and commit any transaction in this function.
After calling this function the diagram will be updated immediately.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#mouseHover">mouseHover</a>, <a href="GraphObject.html#mouseEnter">mouseEnter</a>, <a href="GraphObject.html#mouseLeave">mouseLeave</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="name" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the name for this object.
The default value is the empty string.
The name should be unique within a <a href="Panel.html">Panel</a>, although if it isn't,
it reduces the usefulness of methods such as <a href="Panel.html#findObject">Panel.findObject</a>.</p>
<div><p>You must not modify the name of a GraphObject once it is in the visual tree of a Part.</p>
<p>This is frequently needed to identify a particular GraphObject in the visual tree of a Part,
for example as the value of the <a href="Part.html#locationObjectName">Part.locationObjectName</a> or
<a href="Part.html#selectionObjectName">Part.selectionObjectName</a> properties.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="naturalBounds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> natural<wbr/>Bounds<span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><a href="#naturalBounds" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the natural bounding rectangle of this GraphObject in local coordinates,
before any transformation by <a href="GraphObject.html#scale">scale</a> or <a href="GraphObject.html#angle">angle</a>.
Defaults to unknown (NaN,NaN).</p>
<div><p>You must not modify any of the properties of the <a href="Rect.html">Rect</a> that is the value of this property.</p>
<p>The value can only be changed by changing properties of the particular GraphObject,
such as <a href="GraphObject.html#desiredSize">GraphObject.desiredSize</a>, <a href="Shape.html#geometry">Shape.geometry</a>, or <a href="TextBlock.html#font">TextBlock.font</a>.</p>
<p>As with all read-only properties, using this property as a binding source is unlikely to be useful.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#desiredSize">desiredSize</a>, <a href="GraphObject.html#measuredBounds">measuredBounds</a>, <a href="GraphObject.html#actualBounds">actualBounds</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="opacity" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> opacity<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#opacity" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the multiplicative opacity for this GraphObject and (if a Panel) all elements.
The value must be between 0.0 (fully transparent) and 1.0 (no additional transparency).</p>
<div><p>Unlike <a href="GraphObject.html#visible">visible</a>, Opacity only affects drawing, it does not cause objects to be resized or remeasured.
Opacity settings do not change the shape of the object or exclude it from object-picking
(does not change whether any objects are found by the "find..." methods).</p>
<p>This value is multiplicative with any existing transparency,
for instance from <a href="Layer.html#opacity">Layer.opacity</a> or a GraphObject's opacity higher in the visual tree,
or from a <a href="Brush.html">Brush</a> or image transparency.
The default value is 1.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#visible">visible</a>, <a href="GraphObject.html#pickable">pickable</a>, <a href="Layer.html#opacity">Layer.opacity</a>, <a href="Diagram.html#opacity">Diagram.opacity</a></p>
</dd><dt class="">since</dt><dd><p>1.4</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="panel" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> panel<span class="tsd-signature-symbol">: </span><a href="Panel.html" class="tsd-signature-type" data-tsd-kind="Class">Panel</a><a href="#panel" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the GraphObject's containing <a href="Panel.html">Panel</a>, or null if this object is not in a Panel.</p>
<div><p>Although <a href="Part.html">Part</a> inherits from this class, a Part will never belong to a Panel,
so this property will always be null for every <a href="Node.html">Node</a> or <a href="Link.html">Link</a>.</p>
<p>This property is not settable.
Instead, call <a href="Panel.html#add">Panel.add</a> in order to put a GraphObject in a Panel.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="part" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> part<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><a href="#part" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the <a href="Part.html">Part</a> containing this object, if any.
The Part will be the root GraphObject in this GraphObject's visual tree.</p>
<div><p>It is common to refer to the containing Part of a GraphObject
in order to refer to the <a href="Panel.html#data">Panel.data</a> to which it is bound.</p>
<p>This property is not settable.
If you want this GraphObject to belong to a Part, you will need to add it to a Part,
or else add it to some visual tree structure that is added to a Part using <a href="Panel.html#add">Panel.add</a>.</p>
<p>Note that for objects such as buttons that are in <a href="Adornment.html">Adornment</a>s such as tooltips or context menus,
this property will return that Adornment, not the Node or Link that is adorned.</p>
<p>If you want to find a <a href="Group.html">Group</a> that contains a Part, use the <a href="Part.html#containingGroup">Part.containingGroup</a> property:
<code>someObj.part.containingGroup</code></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="pickable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> pickable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#pickable" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether or not this GraphObject can be chosen by visual "find" or "hit-test" methods such
as <a href="Diagram.html#findObjectAt">Diagram.findObjectAt</a>.</p>
<div><p>This object does not get any mouse/touch events if it is not <a href="GraphObject.html#visible">visible</a>
or if it is not <a href="GraphObject.html#pickable">pickable</a>.</p>
<p>The default value is true -- mouse events on this object will be noticed.
If this value is false and this object is a <a href="Panel.html">Panel</a>, not only is this Panel not "hittable",
but all of the elements inside the Panel will be ignored.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#visible">visible</a>, <a href="GraphObject.html#opacity">opacity</a>, <a href="Layer.html#pickable">Layer.pickable</a>, <a href="Panel.html#isEnabled">Panel.isEnabled</a></p>
</dd><dt class="">since</dt><dd><p>1.2</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="portId" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> port<wbr/>Id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#portId" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets an identifier for an object acting as a port on a Node.
The default value is null -- this object is not a port.</p>
<div><p>A value that is the empty string is used by convention to mean the primary
(and usually only) port of the node.</p>
<p>If a Node has no named ports, then the Node itself is the sole port.</p>
<p>Note: the only kind of model that can save port information, i.e. portIds that are not an empty string,
for links is a <a href="GraphLinksModel.html">GraphLinksModel</a> whose <a href="GraphLinksModel.html#linkFromPortIdProperty">GraphLinksModel.linkFromPortIdProperty</a> and
<a href="GraphLinksModel.html#linkToPortIdProperty">GraphLinksModel.linkToPortIdProperty</a> have been set to name properties on the link data objects.</p>
<p>The value should be unique within the <a href="Node.html">Node</a>.
You must not modify this property once this GraphObject is in the visual tree of a Node.</p>
<p class="boxread">
See <a href="../../intro/ports.html">the Introduction page on ports</a>
for usage information and examples.</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#fromLinkable">fromLinkable</a>, <a href="GraphObject.html#toLinkable">toLinkable</a>, <a href="GraphObject.html#fromSpot">fromSpot</a>, <a href="GraphObject.html#toSpot">toSpot</a>, <a href="Link.html#fromSpot">Link.fromSpot</a>, <a href="Link.html#toSpot">Link.toSpot</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="position" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> position<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the position of this GraphObject in container coordinates
(either a <a href="Panel.html">Panel</a> or the document).
Value must be of type Point.
You cannot modify the x or y of the value of this property --
if you want to change the position you must set this property to a different Point.
Default is <code>Point(NaN, NaN)</code>.</p>
<div><p>For <a href="Part.html">Part</a>s, see also <a href="Part.html#location">Part.location</a>.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="row" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> row<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#row" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the row of this GraphObject if it is in a Table <a href="Panel.html">Panel</a>.
The value must be a small non-negative integer. The default is 0.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="rowSpan" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> row<wbr/>Span<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#rowSpan" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the number of rows spanned by this GraphObject if it is in a Table <a href="Panel.html">Panel</a>.
The value must be a small positive integer. The default is 1.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="scale" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> scale<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#scale" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the scale transform of this GraphObject.
Value must be a number; larger values will make this object appear bigger.
Default is 1.</p>
<dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#angle">angle</a>, <a href="GraphObject.html#stretch">stretch</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="segmentFraction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> segment<wbr/>Fraction<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#segmentFraction" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the fractional distance along a segment of a GraphObject that is in a <a href="Link.html">Link</a>.
The value should be between zero and one, where zero is at the point at the start of the segment,
and where one is at the point at the end of the segment.
The default value is zero.</p>
<div><p>If <a href="GraphObject.html#segmentIndex">segmentIndex</a> is set to NaN, the fractional distance will be calculated along the entire link route.</p>
<p>For examples of how to use this property, see <a href="../../intro/linkLabels.html">Link Labels</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#segmentIndex">segmentIndex</a>, <a href="GraphObject.html#segmentOffset">segmentOffset</a>, <a href="GraphObject.html#segmentOrientation">segmentOrientation</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="segmentIndex" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> segment<wbr/>Index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#segmentIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the segment index of a GraphObject that is in a <a href="Link.html">Link</a>.
Non-negative numbers count up from zero, which is the first segment, at the "from" end of the Link.
Negative numbers count segments from the "to" end of the Link, where -1 means the last segment
and -2 means the next-to-last segment.
The default value is -Infinity. The value should be an integer or NaN.</p>
<div><p>Setting this value to NaN means <a href="GraphObject.html#segmentFraction">segmentFraction</a>'s fractional distance will be calculated along the entire link route.
A NaN value also means the <a href="Link.html#midPoint">Link.midPoint</a> and <a href="Link.html#midAngle">Link.midAngle</a> will not be used when determining label positions.</p>
<p>If you do not set this property, the Link will choose a place that is approximately at the
mid-point of the link's route.</p>
<p>For examples of how to use this property, see <a href="../../intro/linkLabels.html">Link Labels</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#segmentFraction">segmentFraction</a>, <a href="GraphObject.html#segmentOffset">segmentOffset</a>, <a href="GraphObject.html#segmentOrientation">segmentOrientation</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="segmentOffset" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> segment<wbr/>Offset<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a><a href="#segmentOffset" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the offset of a GraphObject that is in a <a href="Link.html">Link</a> from a point on a segment
or in a <a href="Panel.html#static-Graduated">Panel.Graduated</a> from a point along the main element.
The X component of the Point indicates the distance along the route,
with positive values going further toward the "to" end of the link or panel.
The Y component of the Point indicates the distance away from the route,
with positive values towards the right as seen when facing further towards the "to" end of the link or panel.
The value defaults to the Point (0, 0).
You cannot modify the x or y of the value of this property --
if you want to change the segmentOffset you must set this property to a different Point.</p>
<div><p>For labels that are near either end of a link, it may be convenient to set the segmentOffset
to Point(NaN, NaN). This causes the offset to be half the width and half the height of the label object.</p>
<p>For examples of how to use this property, see <a href="../../intro/linkLabels.html">Link Labels</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#segmentFraction">segmentFraction</a>, <a href="GraphObject.html#segmentIndex">segmentIndex</a>, <a href="GraphObject.html#segmentOrientation">segmentOrientation</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="segmentOrientation" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> segment<wbr/>Orientation<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EnumValue</span><a href="#segmentOrientation" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the orientation of a GraphObject that is in a <a href="Link.html">Link</a> or <a href="Panel.html#static-Graduated">Panel.Graduated</a>.
This controls the automatic rotation of the object by the Link Panel or Graduated Panel.
The only accepted values are the <a href="Link.html">Link</a> "Orient..." values of Link
and the default value: <a href="Link.html#static-None">Link.None</a>.</p>
<div><p>When the value is <a href="Link.html#static-None">Link.None</a>, the <a href="GraphObject.html#angle">angle</a> of this object is unchanged as the link is routed.
Setting this to a value of <a href="Link.html#static-OrientAlong">Link.OrientAlong</a> will cause routing to set the <a href="GraphObject.html#angle">angle</a>
to be the angle of the segment that this object is on.
Other values compute the angle somewhat differently.
If the value is changed back to <a href="Link.html#static-None">Link.None</a>, the <a href="GraphObject.html#angle">angle</a> of this object is set to zero.</p>
<p>Note that when this property is not <a href="Link.html#static-None">Link.None</a>, this property takes precedence
over any setting or binding of the <a href="GraphObject.html#angle">angle</a> property.
Changes to the angle caused by orientation might not result in Changed events,
and any original value for the angle may be lost.</p>
<p>In the case of Graduated Panels, if this value is <a href="Link.html#static-None">Link.None</a>, <a href="Link.html#static-OrientAlong">Link.OrientAlong</a>, or <a href="Link.html#static-OrientUpright">Link.OrientUpright</a>,
any TextBlock label <a href="GraphObject.html#angle">angle</a> will be respected. Depending on this value, the effective TextBlock angle will be either
fixed or relative to the slope of the path where it is rendered.</p>
<p>For examples of how to use this property, see <a href="../../intro/linkLabels.html">Link Labels</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#segmentFraction">segmentFraction</a>, <a href="GraphObject.html#segmentIndex">segmentIndex</a>, <a href="GraphObject.html#segmentOffset">segmentOffset</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="shadowVisible" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> shadow<wbr/>Visible<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#shadowVisible" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether or not this GraphObject will be shadowed inside a Part that has <a href="Part.html#isShadowed">Part.isShadowed</a> set to true.</p>
<div><p>The default is null, which means this GraphObject will obey the default shadow rules (see <a href="Part.html#isShadowed">Part.isShadowed</a>).</p>
<p>A value of true or false will ensure that this part is shadowed or not regardless of the default shadow rules,
but this GraphObject's shadowed status will not affect other GraphObjects in the Part.</p>
<p>Typically this property does not need to be set, but you may need to set this value to false
on GraphObjects inside a Part that you do not wish to be shadowed.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Part.html#isShadowed">Part.isShadowed</a></p>
</dd><dt class="">since</dt><dd><p>1.6</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="stretch" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> stretch<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EnumValue</span><a href="#stretch" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the stretch of the GraphObject.
This controls whether the width and/or height of this object automatically adjusts to fill
the area allotted by the containing Panel.</p>
<div><p>The only accepted values are listed as constant properties of GraphObject,
such as <a href="GraphObject.html#static-None">GraphObject.None</a>, <a href="GraphObject.html#static-Fill">GraphObject.Fill</a>, <a href="GraphObject.html#static-Horizontal">GraphObject.Horizontal</a>, or <a href="GraphObject.html#static-Vertical">GraphObject.Vertical</a>.
The default value is <a href="GraphObject.html#static-Default">GraphObject.Default</a>, which allows the Panel to decide how to treat this object, depending on the type of Panel.</p>
<p>Objects with an <a href="GraphObject.html#angle">angle</a> that are stretched may look incorrect unless the angle is a multiple of 90.</p>
<p>Stretch will have have different effects based upon the Panel containing this object. Elements of:</p>
<ul>
<li>Auto panels will not stretch, except the main element growing to fill the panel or being made uniform</li>
<li>Horizontal panels will only stretch vertically</li>
<li>Vertical panels will only stretch horizontally</li>
<li>Spot panels will stretch to the size of the main element</li>
<li>Table panels will stretch to the size of their cell, defined by their row and column, which is usually determined by other GraphObjects in that cell that are not stretching</li>
<li>Grid panels, Link panels, and Graduated panels will not stretch</li>
</ul>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Panel.html#defaultStretch">Panel.defaultStretch</a>, <a href="GraphObject.html#desiredSize">desiredSize</a>, <a href="GraphObject.html#minSize">minSize</a>, <a href="GraphObject.html#maxSize">maxSize</a>, <a href="GraphObject.html#measuredBounds">measuredBounds</a>, <a href="GraphObject.html#actualBounds">actualBounds</a>, <a href="GraphObject.html#scale">scale</a>, <a href="Picture.html#imageStretch">Picture.imageStretch</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toEndSegmentLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> to<wbr/>End<wbr/>Segment<wbr/>Length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#toEndSegmentLength" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the length of the last segment of a link going to this port.
This value is used when the computed "to spot" is not <a href="Spot.html#static-None">Spot.None</a>.
The default value is 10.</p>
<div><p>The value of <a href="Link.html#toEndSegmentLength">Link.toEndSegmentLength</a>, if not NaN, takes precedence over the value at this port
when determining the route of the link.
This value also limits how short the <a href="Link.html#toShortLength">Link.toShortLength</a> may be drawn.</p>
<p>For examples of how to use this property, see <a href="../../intro/links.html#EndSegmentLengths">Link End Segment Lengths</a>.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Link.html#toEndSegmentLength">Link.toEndSegmentLength</a>, <a href="Link.html#computeEndSegmentLength">Link.computeEndSegmentLength</a>, <a href="GraphObject.html#fromEndSegmentLength">fromEndSegmentLength</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toLinkable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> to<wbr/>Linkable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#toLinkable" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may draw Links to this port.
This property is used by <a href="LinkingBaseTool.html#isValidTo">LinkingBaseTool.isValidTo</a>.</p>
<div><p>The default value is null, which indicates that the real value is inherited from
the parent <a href="Panel.html">Panel</a>, or false if there is no containing panel.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node,
or unless you are disabling the "linkability" of a particular GraphObject
inside a Panel whose toLinkable has been set or bound to true.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#fromLinkable">fromLinkable</a>, <a href="GraphObject.html#toMaxLinks">toMaxLinks</a>, <a href="GraphObject.html#portId">portId</a>, <a href="GraphObject.html#cursor">cursor</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toLinkableDuplicates" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> to<wbr/>Linkable<wbr/>Duplicates<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#toLinkableDuplicates" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may draw duplicate Links to this port.
This property is used by <a href="LinkingBaseTool.html#isValidLink">LinkingBaseTool.isValidLink</a>.
The default value is false.</p>
<div><p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#toLinkable">toLinkable</a>, <a href="GraphObject.html#toLinkableSelfNode">toLinkableSelfNode</a>, <a href="GraphObject.html#fromLinkableDuplicates">fromLinkableDuplicates</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toLinkableSelfNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> to<wbr/>Linkable<wbr/>Self<wbr/>Node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#toLinkableSelfNode" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may draw Links that connect to this port's Node.
This property is used by <a href="LinkingBaseTool.html#isValidLink">LinkingBaseTool.isValidLink</a>.
The default value is false.</p>
<div><p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#toLinkable">toLinkable</a>, <a href="GraphObject.html#toLinkableDuplicates">toLinkableDuplicates</a>, <a href="GraphObject.html#fromLinkableSelfNode">fromLinkableSelfNode</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toMaxLinks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> to<wbr/>Max<wbr/>Links<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#toMaxLinks" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the maximum number of links that may go into this port.
This property is used by <a href="LinkingBaseTool.html#isValidTo">LinkingBaseTool.isValidTo</a>.</p>
<div><p>The value must be non-negative.
The default value is Infinity.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#toLinkable">toLinkable</a>, <a href="GraphObject.html#fromMaxLinks">fromMaxLinks</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toShortLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> to<wbr/>Short<wbr/>Length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#toShortLength" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets how far the end segment of a link going to this port stops short of the actual port.
Positive values are limited by the <a href="GraphObject.html#toEndSegmentLength">toEndSegmentLength</a> or <a href="Link.html#toEndSegmentLength">Link.toEndSegmentLength</a>.
Negative values cause the link to extend into the port.
The default value is zero.</p>
<div><p>This property is useful when you have a thick link and a pointy arrowhead.
Normally the link Shape extends all the way to the end of the arrowhead.
If the link Shape is wide, its edges will be seen behind the arrowhead.
By setting this property to a small positive value, the link Shape can end within the
body of the arrowhead, leaving only the point of the arrowhead visible at the end of the link.</p>
<p>A negative value for this property can also be useful when you want the link Shape to continue
into the port, perhaps because a portion of the port is transparent and you want the link to
appear to connect visually with a different point on the node.</p>
<p>The value of <a href="Link.html#toShortLength">Link.toShortLength</a>, if not NaN, takes precedence over the value at this port
when determining the route of the link.</p>
<p>For examples of how to use this property, see <a href="../../intro/connectionPoints.html">Link Connection Points</a>.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#fromShortLength">fromShortLength</a>, <a href="Link.html#toShortLength">Link.toShortLength</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toSpot" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> to<wbr/>Spot<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type" data-tsd-kind="Class">Spot</a><a href="#toSpot" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets where a link should connect to this port.
The default value is <a href="Spot.html#static-None">Spot.None</a>, meaning that the link routing
must consider the shape of the port and connect to the closest point.</p>
<div><p>The value of <a href="Link.html#toSpot">Link.toSpot</a>, if not <a href="Spot.html#static-Default">Spot.Default</a>, takes precedence over the value at this port
when determining the route of the link.
A number of the predefined <a href="Layout.html">Layout</a>s automatically set <a href="Link.html#fromSpot">Link.fromSpot</a> and <a href="Link.html#toSpot">Link.toSpot</a>,
thereby causing this property and <a href="GraphObject.html#fromSpot">fromSpot</a> on the port element to be ignored.
Depending on the layout, you may be able to disable that behavior, such as by setting <a href="ForceDirectedLayout.html#setsPortSpots">ForceDirectedLayout.setsPortSpots</a>,
<a href="TreeLayout.html#setsPortSpot">TreeLayout.setsPortSpot</a>, <a href="TreeLayout.html#setsChildPortSpot">TreeLayout.setsChildPortSpot</a>, or <a href="LayeredDigraphLayout.html#setsPortSpots">LayeredDigraphLayout.setsPortSpots</a> to false.</p>
<p>For examples of how to use this property, see <a href="../../intro/connectionPoints.html">Link Connection Points</a>.</p>
<p>You must set this property on a GraphObject whose <a href="GraphObject.html#portId">portId</a> is non-null,
unless the whole <a href="Node.html">Node</a> is acting as a single port,
in which case this property should be set on the Node.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Link.html#toSpot">Link.toSpot</a>, <a href="Link.html#computeSpot">Link.computeSpot</a>, <a href="GraphObject.html#fromSpot">fromSpot</a>, <a href="GraphObject.html#portId">portId</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="toolTip" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> tool<wbr/>Tip<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a><a href="#toolTip" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This <a href="Adornment.html">Adornment</a> or <a href="HTMLInfo.html">HTMLInfo</a> is shown when the mouse hovers over this object.
The default value is null, which means no tooltip is shown.</p>
<div><p>A typical tooltip is defined in the following manner, as taken from
the <a href="../../samples/kittenMonitor.html">Kitten Monitor sample</a>:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">nodeTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Node</span><span class="hl-2">,</span><br/><span class="hl-2"> . . .</span><br/><span class="hl-2"> { </span><span class="hl-0">// this tooltip shows the name and picture of the kitten</span><br/><span class="hl-2"> </span><span class="hl-4">toolTip:</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-6">"ToolTip"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Panel</span><span class="hl-2">, </span><span class="hl-6">"Vertical"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Picture</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Binding</span><span class="hl-2">(</span><span class="hl-6">"source"</span><span class="hl-2">, </span><span class="hl-6">"src"</span><span class="hl-2">, </span><span class="hl-4">s</span><span class="hl-2"> </span><span class="hl-1">=></span><span class="hl-2"> </span><span class="hl-4">return</span><span class="hl-2"> </span><span class="hl-6">"images/"</span><span class="hl-2"> + </span><span class="hl-4">s</span><span class="hl-2"> + </span><span class="hl-6">".png"</span><span class="hl-2">)),</span><br/><span class="hl-2"> </span><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TextBlock</span><span class="hl-2">, { </span><span class="hl-4">margin:</span><span class="hl-2"> </span><span class="hl-7">3</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Binding</span><span class="hl-2">(</span><span class="hl-6">"text"</span><span class="hl-2">, </span><span class="hl-6">"key"</span><span class="hl-2">))))</span><br/><span class="hl-2"> });</span>
</code></pre>
<p>Note that this Adornment depends on having the same data binding as the adorned Part
(i.e. the same value for <a href="Panel.html#data">Panel.data</a>).</p>
<p>Tooltips are not copied by <a href="GraphObject.html#copy">copy</a>, so that tooltips may be shared by all instances of a template.</p>
<p>Tooltips are shown after a timed delay given by the <a href="ToolManager.html#hoverDelay">ToolManager.hoverDelay</a>.
You can change the delay time by:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2"> = </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Diagram</span><span class="hl-2">(</span><span class="hl-6">"myDiagramDiv"</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-6">"toolManager.hoverDelay"</span><span class="hl-4">:</span><span class="hl-2"> </span><span class="hl-7">500</span><span class="hl-2"> }); </span><span class="hl-0">// 500 milliseconds</span>
</code></pre>