File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 112112 }
113113
114114 function updateStats ( ) {
115- $ ( "#selected_node_count" ) . innerText = selection . getSelectedNodes ( ) . length ;
116- $ ( "#selected_link_count" ) . innerText = selection . getSelectedLinks ( ) . length ;
115+ $ ( "#selected_node_count" ) . innerText = selection . getSelectedNodes ( ) . size ;
116+ $ ( "#selected_link_count" ) . innerText = selection . getSelectedLinks ( ) . size ;
117117 $ ( "#node_count" ) . innerText = my_data . links . length ;
118118 $ ( "#link_count" ) . innerText = my_data . nodes . length ;
119119 }
245245 }
246246
247247 if ( query . indexOf ( "%selected_nodes%" ) !== - 1 ) {
248- var node_ids = selection . getSelectedNodes ( ) ;
248+ var node_ids = Array . from ( selection . getSelectedNodes ( ) ) ;
249249 query = query . replace ( "%selected_nodes%" , node_ids . join ( "," ) ) ;
250250 }
251251
252252 if ( query . indexOf ( "%selected_links%" ) !== - 1 ) {
253- var link_ids = selection . getSelectedLinks ( ) ;
253+ var link_ids = Array . from ( selection . getSelectedLinks ( ) ) ;
254254 query = query . replace ( "%selected_links%" , link_ids . join ( "," ) ) ;
255255 }
256256
318318 const key = $ ( "#object_add_key" ) . value ;
319319 const value = $ ( "#object_add_value" ) . value ;
320320
321- const node_ids = selection . getSelectedNodes ( ) ;
322- const link_ids = selection . getSelectedLinks ( ) ;
321+ const node_ids = Array . from ( selection . getSelectedNodes ( ) ) ;
322+ const link_ids = Array . from ( selection . getSelectedLinks ( ) ) ;
323323 if ( node_ids . length > 0 || link_ids . length > 0 ) {
324324 if ( key . length > 0 ) {
325325 if ( doSet ) {
You can’t perform that action at this time.
0 commit comments