Skip to content

Set/unset color of node and edge programmatically? #287

@oscargus

Description

@oscargus

I'd like to be able to unset the color of a node (basically doing self.props.color = None). reset_color? Or is it possible in some other way?

pub fn reset_color(&mut self, color: Color32) {
    self.props.color = None;
}

Similarly, is it possible to programmatically set/unset the color of an edge? Seems slightly more complicated than the above since there is no support for colors as far as I can tell.

Context: I have a graph representing something else and when I select something in the other view, I would like to highlight which node/edge this corresponds to. I can currently set the color of the node, but only unset it to e.g. WHITE which will mess up a light mode display.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions