mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
Nested networks UI (#885)
* Initial UI for nested nodes * Clean up deleting nodes * Print address of nested network * Add exiting network message * Implement the breadcrumb trail * Remove whitespace * Fix double click not registering in Chromium Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
parent
52117d642c
commit
9d40539dc7
@@ -139,6 +139,24 @@ pub enum DocumentNodeImplementation {
|
||||
Unresolved(NodeIdentifier),
|
||||
}
|
||||
|
||||
impl DocumentNodeImplementation {
|
||||
pub fn get_network(&self) -> Option<&NodeNetwork> {
|
||||
if let DocumentNodeImplementation::Network(n) = self {
|
||||
Some(n)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_network_mut(&mut self) -> Option<&mut NodeNetwork> {
|
||||
if let DocumentNodeImplementation::Network(n) = self {
|
||||
Some(n)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, DynAny)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub struct NodeNetwork {
|
||||
|
||||
Reference in New Issue
Block a user