fn collect_drag_children_indices(&mut self, id: usize, context: &ScreenContext) {
        if let Some(behavior) = context.data.get_behavior(self.get_curr_behavior_id(context), self.graph_type) {
            for (source_node_id , _source_connector, dest_node_id, _dest_connector) in &behavior.data.connections {
                if *source_node_id == id {
                    let index = self.node_id_to_widget_index(*dest_node_id);
                    if self.drag_indices.contains(&index) == false {
                        self.drag_indices.push(index);
                        self.drag_node_pos.push((self.nodes[index].user_data.position.0 as isize, self.nodes[index].user_data.position.1 as isize));
                    }
                    self.collect_drag_children_indices(*dest_node_id, context);
                }
            }
        }
    }
/// Collects the children indices of the given node id so that they can all be dragged at once
Collects the children indices of the given node id so that they can all be dragged at once
Collects the children indices of the given node id so that they can all be dragged at once
fn collect_drag_children_indices(&mut self, id: usize, context: &ScreenContext) {
        if let Some(behavior) = context.data.get_behavior(self.get_curr_behavior_id(context), self.graph_type) {
            for (source_node_id , _source_connector, dest_node_id, _dest_connector) in &behavior.data.connections {
                if *source_node_id == id {
                    let index = self.node_id_to_widget_index(*dest_node_id);
                    if self.drag_indices.contains(&index) == false {
                        self.drag_indices.push(index);
                        self.drag_node_pos.push((self.nodes[index].user_data.position.0 as isize, self.nodes[index].user_data.position.1 as isize));
                    }
                    self.collect_drag_children_indices(*dest_node_id, context);
                }
            }
        }
    }
fn collect_drag_children_indices ( & mut self , id : usize , context : & ScreenContext ) { if let Some ( behavior ) = context . data . get_behavior ( self . get_curr_behavior_id ( context ) , self . graph_type ) { for ( source_node_id , _source_connector , dest_node_id , _dest_connector ) in & behavior . data . connections { if * source_node_id == id { let index = self . node_id_to_widget_index ( * dest_node_id ) ; if self . drag_indices . contains ( & index ) == false { self . drag_indices . push ( index ) ; self . drag_node_pos . push ( ( self . nodes [ index ] . user_data . position . 0 as isize , self . nodes [ index ] . user_data . position . 1 as isize ) ) ; } self . collect_drag_children_indices ( * dest_node_id , context ) ; } } } }
Collects the children indices of the given node id so that they can all be dragged at once
Collects the children indices of the given node id so that they can all be dragged at once
&mut self
id
usize
context
&ScreenContext
&mut self
id
usize
context
&ScreenContext