Improve previewing node data (#1446)

* Improve preview

* Improve contrast

* Restructure in order to duplicate code

* Code review nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube 2023-11-04 09:52:26 +00:00 committed by GitHub
parent c823016316
commit e0ac073805
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 326 additions and 202 deletions

View file

@ -1019,15 +1019,15 @@ impl NodeNetwork {
// We filter out the newly inserted empty stack in case `resolve_empty_stacks` runs multiple times.
for node in self.nodes.values_mut().filter(|node| node.name != EMPTY_STACK) {
for input in &mut node.inputs {
if matches!(
input,
NodeInput::Value {
tagged_value: TaggedValue::GraphicGroup(GraphicGroup::EMPTY),
..
if let NodeInput::Value {
tagged_value: TaggedValue::GraphicGroup(graphic_group),
..
} = input
{
if *graphic_group == GraphicGroup::EMPTY {
*input = NodeInput::node(new_id, 0);
used = true;
}
) {
*input = NodeInput::node(new_id, 0);
used = true;
}
}
}