@@ -46,13 +46,6 @@ export class AppComponent {
46
46
{ key : 'PaletteNode1' , color : 'firebrick' } ,
47
47
{ key : 'PaletteNode2' , color : 'blueviolet' }
48
48
] ,
49
- paletteLinkData : [
50
- {
51
- points : new go . List ( /*go.Point*/ ) . addAll ( [ new go . Point ( 0 , 0 ) , new go . Point ( 30 , 0 ) , new go . Point ( 30 , 40 ) , new go . Point ( 60 , 40 ) ] ) ,
52
- strokeWidth : 4 , dash : [ 6 , 3 ]
53
- } ,
54
- { points : new go . List ( /*go.Point*/ ) . addAll ( [ new go . Point ( 20 , 20 ) , new go . Point ( 60 , 20 ) , new go . Point ( 60 , 40 ) , new go . Point ( 60 , 50 ) ] ) }
55
- ] ,
56
49
paletteModelData : { prop : 'val' }
57
50
} ;
58
51
@@ -153,37 +146,7 @@ export class AppComponent {
153
146
new go . Binding ( 'text' , 'key' ) )
154
147
) ;
155
148
156
- palette . linkTemplate = $ ( go . Link ,
157
- { // because the GridLayout.alignment is Location and the nodes have locationSpot == Spot.Center,
158
- // to line up the Link in the same manner we have to pretend the Link has the same location spot
159
- locationSpot : go . Spot . Center ,
160
- selectionAdornmentTemplate :
161
- $ ( go . Adornment , 'Link' ,
162
- { locationSpot : go . Spot . Center } ,
163
- $ ( go . Shape ,
164
- { isPanelMain : true , fill : null , stroke : 'deepskyblue' , strokeWidth : 0 } , new go . Binding ( 'strokeDashArray' , 'dash' ) ) ,
165
- $ ( go . Shape , // the arrowhead
166
- { toArrow : 'Standard' , stroke : null } )
167
- )
168
- } ,
169
- {
170
- routing : go . Link . AvoidsNodes ,
171
- curve : go . Link . JumpOver ,
172
- corner : 5 ,
173
- toShortLength : 4
174
- } ,
175
- new go . Binding ( 'points' ) ,
176
- $ ( go . Shape , // the link path shape
177
- { isPanelMain : true } , new go . Binding ( 'strokeDashArray' , 'dash' ) ) ,
178
- $ ( go . Shape , // the arrowhead
179
- { toArrow : 'Standard' , stroke : null } )
180
- )
181
-
182
- palette . model = $ ( go . GraphLinksModel ,
183
- {
184
- linkKeyProperty : 'key' // IMPORTANT! must be defined for merges and data sync when using GraphLinksModel
185
- } ) ;
186
-
149
+ palette . model = $ ( go . GraphLinksModel ) ;
187
150
return palette ;
188
151
}
189
152
0 commit comments