Drag out links to disconnect nodes (#894)

* Disconnecting Links

* Fix bug if nodeid is 0
This commit is contained in:
0HyperCube
2022-12-21 19:19:24 +00:00
committed by Keavon Chambers
parent 4f637ee18b
commit 5e95090504
4 changed files with 58 additions and 3 deletions

View File

@@ -587,6 +587,13 @@ impl JsEditorHandle {
self.dispatch(message);
}
/// Notifies the backend that the user disconnected a node
#[wasm_bindgen(js_name = disconnectNodes)]
pub fn disconnect_nodes(&self, node_id: u64, input_index: usize) {
let message = NodeGraphMessage::DisconnectNodes { node_id, input_index };
self.dispatch(message);
}
/// Creates a new document node in the node graph
#[wasm_bindgen(js_name = createNode)]
pub fn create_node(&self, node_type: String, x: i32, y: i32) {