mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-18 18:38:05 +08:00
Improve the Data panel with type-specific detail pages and nested-layer support (#4070)
* Improve the Data panel with more type-specific detail pages * Add network_path to SetDisplayName so renames target any network depth * Track nested layers via full editor:layer paths and rename parent_layer to path_of_subgraph * Polish the data panel NodeId leaf page with an editable name field * Make lock and visibility toggles work for layers in nested subgraphs * Fix formatting * Fix connected_to_output running in the wrong network for nested-layer toggles
This commit is contained in:
@@ -775,6 +775,7 @@ impl EditorWrapper {
|
||||
let layer = LayerNodeIdentifier::new_unchecked(NodeId(id));
|
||||
let message = NodeGraphMessage::SetDisplayName {
|
||||
node_id: layer.to_node(),
|
||||
network_path: Vec::new(),
|
||||
alias: name,
|
||||
skip_adding_history_step: false,
|
||||
};
|
||||
@@ -912,7 +913,7 @@ impl EditorWrapper {
|
||||
#[wasm_bindgen(js_name = toggleNodeVisibilityLayerPanel)]
|
||||
pub fn toggle_node_visibility_layer(&self, id: u64) {
|
||||
let node_id = NodeId(id);
|
||||
let message = NodeGraphMessage::ToggleVisibility { node_id };
|
||||
let message = NodeGraphMessage::ToggleVisibility { node_id, network_path: Vec::new() };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
@@ -931,7 +932,10 @@ impl EditorWrapper {
|
||||
/// Toggle lock state of a layer from the layer list
|
||||
#[wasm_bindgen(js_name = toggleLayerLock)]
|
||||
pub fn toggle_layer_lock(&self, node_id: u64) {
|
||||
let message = NodeGraphMessage::ToggleLocked { node_id: NodeId(node_id) };
|
||||
let message = NodeGraphMessage::ToggleLocked {
|
||||
node_id: NodeId(node_id),
|
||||
network_path: Vec::new(),
|
||||
};
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user