Node 'Disable' and 'Preview' UX improvements (#918)

* Don't allow disabling input or output nodes

* Shortcuts to show and preview node

* Update preview tooltip and label

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2022-12-28 11:38:35 -08:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent d969a4d797
commit b660df84ba
6 changed files with 81 additions and 43 deletions
+7
View File
@@ -648,6 +648,13 @@ impl JsEditorHandle {
self.dispatch(message);
}
/// Toggle preview on node
#[wasm_bindgen(js_name = togglePreview)]
pub fn toggle_preview(&self, node_id: NodeId) {
let message = NodeGraphMessage::TogglePreview { node_id };
self.dispatch(message);
}
/// Pastes an image
#[wasm_bindgen(js_name = pasteImage)]
pub fn paste_image(&self, mime: String, image_data: Vec<u8>, mouse_x: Option<f64>, mouse_y: Option<f64>) {