Pasting and duplicating nodes (#902)

* Pasting and duplicating nodes

* Rebind duplication

* Update selection on duplicate
This commit is contained in:
0HyperCube
2022-12-22 21:47:48 +00:00
committed by Keavon Chambers
parent 537dbf266a
commit 1f69b0f35f
8 changed files with 119 additions and 2 deletions
+7
View File
@@ -627,6 +627,13 @@ impl JsEditorHandle {
self.dispatch(message);
}
/// Pastes the nodes based on serialized data
#[wasm_bindgen(js_name = pasteSerializedNodes)]
pub fn paste_serialized_nodes(&self, serialized_nodes: String) {
let message = NodeGraphMessage::PasteNodes { serialized_nodes };
self.dispatch(message);
}
/// Notifies the backend that the user double clicked a node
#[wasm_bindgen(js_name = doubleClickNode)]
pub fn double_click_node(&self, node: u64) {