Make branch lines take their parent's color
A node's color now flows down the lines to its children, mind-map style: Watering's teal colors the lines to Rain barrel and Drip line. It used to color the line from the root down to Watering itself, which also left the shared bus of a parent's branches in whichever child's color was drawn last. Branches follow their parent by default, and stay dim when the parent has no color. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3b58d6494d
commit
e097e53a85
6 files changed
+49
-17
No files matched your search
@@ -190,7 +190,7 @@ impl Scene {
|
||||
let child = &self.nodes[child_index];
|
||||
let Some(Place::Child { parent, branch }) = doc.place(child.id) else { continue };
|
||||
let Some(&parent_index) = self.index.get(parent) else { continue };
|
||||
let style = theme.branch_style(branch, child.color);
|
||||
let style = theme.branch_style(branch, self.nodes[parent_index].color);
|
||||
let owner = LineOwner::Branch(child.id);
|
||||
self.connect(parent_index, child_index, Bend::NearStart, style, owner, None);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user