fn refresh_node_selection(&self, id: graph_editor::NodeId, node: &controller::graph::Node) {
        let selected_in_metadata = node.metadata.as_ref().map_or_default(|md| md.selected);
        let selected_in_view = self.view.graph().model.nodes.is_selected(id);
        if selected_in_metadata && !selected_in_view {
            self.view.graph().frp.input.select_node.emit(&id)
        } else if !selected_in_metadata && selected_in_view {
            self.view.graph().frp.input.deselect_node.emit(&id)
        }
    }
/// Update the position of the node based on its current metadata.
Update the position of the node based on its current metadata.
Update the position of the node based on its current metadata .
fn refresh_node_selection(&self, id: graph_editor::NodeId, node: &controller::graph::Node) {
        let selected_in_metadata = node.metadata.as_ref().map_or_default(|md| md.selected);
        let selected_in_view = self.view.graph().model.nodes.is_selected(id);
        if selected_in_metadata && !selected_in_view {
            self.view.graph().frp.input.select_node.emit(&id)
        } else if !selected_in_metadata && selected_in_view {
            self.view.graph().frp.input.deselect_node.emit(&id)
        }
    }
fn refresh_node_selection ( & self , id : graph_editor :: NodeId , node : & controller :: graph :: Node ) { let selected_in_metadata = node . metadata . as_ref ( ) . map_or_default ( | md | md . selected ) ; let selected_in_view = self . view . graph ( ) . model . nodes . is_selected ( id ) ; if selected_in_metadata && ! selected_in_view { self . view . graph ( ) . frp . input . select_node . emit ( & id ) } else if ! selected_in_metadata && selected_in_view { self . view . graph ( ) . frp . input . deselect_node . emit ( & id ) } }
Update the position of the node based on its current metadata.
Update the position of the node based on its current metadata .
&self
id
graph_editor::NodeId
node
&controller::graph::Node
&self
id
graph_editor::NodeId
node
&controller::graph::Node