File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 8686 { data : { source : 'h' , target : 'i' } } ,
8787
8888 { data : { id : 'j' } } ,
89+
90+ { data : { id : 'k' } } ,
91+ { data : { id : 'm' } } ,
92+ { data : { id : 'n' } } ,
93+ { data : { source : 'k' , target : 'm' } } ,
94+ { data : { source : 'k' , target : 'n' } } ,
95+ { data : { source : 'm' , target : 'n' } } ,
8996 ]
9097 } ) ;
9198
159166 when : 'matching'
160167 } ) ;
161168
162-
163169 // g kept in viewport
164170
165171 cy . $ ( '#g' ) . position ( { x : 400 , y : 350 } ) ;
194200 } ) ;
195201
196202
203+ // k, m, n all move together on drag as a unit (e.g. cluster)
204+
205+ cy . $ ( '#k' ) . position ( { x : 430 , y : - 20 } ) ;
206+ cy . $ ( '#m' ) . position ( { x : 490 , y : - 110 } ) ;
207+ cy . $ ( '#n' ) . position ( { x : 550 , y : - 20 } ) ;
208+
209+ cy . automove ( {
210+ nodesMatching : cy . $ ( '#k, #m, #n' ) ,
211+ reposition : 'drag' ,
212+ dragWith : cy . $ ( '#k, #m, #n' )
213+ } ) ;
214+
215+
216+
197217 cy . fit ( 100 ) ; // fit to all the layouts
198218
199219
You can’t perform that action at this time.
0 commit comments