Fix hiding and collapsing layers (#1481)

* Hide and collapse layers

* Reorder imports

* Fix Ctrl+H shortcut advertized action and hotkey tooltip; improve graph top right of options bar

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2023-11-27 02:27:11 +00:00
committed by GitHub
parent 6d9dd5fc27
commit 5ee79031ab
22 changed files with 164 additions and 123 deletions

View File

@@ -700,14 +700,14 @@ impl JsEditorHandle {
/// Toggle visibility of a layer from the layer list
#[wasm_bindgen(js_name = toggleLayerVisibility)]
pub fn toggle_layer_visibility(&self, layer_path: Vec<LayerId>) {
let message = DocumentMessage::ToggleLayerVisibility { layer_path };
let message = NodeGraphMessage::ToggleHidden { node_id: *layer_path.last().unwrap() };
self.dispatch(message);
}
/// Toggle expansions state of a layer from the layer list
#[wasm_bindgen(js_name = toggleLayerExpansion)]
pub fn toggle_layer_expansion(&self, layer_path: Vec<LayerId>) {
let message = DocumentMessage::ToggleLayerExpansion { layer_path };
let message = DocumentMessage::ToggleLayerExpansion { layer: *layer_path.last().unwrap() };
self.dispatch(message);
}