mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 03:08:13 +08:00
Fix clippy lints (#1327)
* Fix clippy lints * Update formatting * Remove unsafe send impls * New type for Rc<NodeContainer>
This commit is contained in:
committed by
Keavon Chambers
parent
743803ce04
commit
80cc5bee73
@@ -354,7 +354,7 @@
|
||||
draggingNodes = { startX: e.x, startY: e.y, roundX: 0, roundY: 0 };
|
||||
}
|
||||
|
||||
if (modifiedSelected) editor.instance.selectNodes(new BigUint64Array(selected));
|
||||
if (modifiedSelected) editor.instance.selectNodes(selected.length > 0 ? new BigUint64Array(selected): null);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -362,7 +362,7 @@
|
||||
// Clicked on the graph background
|
||||
if (lmb && selected.length !== 0) {
|
||||
selected = [];
|
||||
editor.instance.selectNodes(new BigUint64Array([]));
|
||||
editor.instance.selectNodes(null);
|
||||
}
|
||||
|
||||
// LMB clicked on the graph background or MMB clicked anywhere
|
||||
|
||||
@@ -645,7 +645,8 @@ impl JsEditorHandle {
|
||||
|
||||
/// Notifies the backend that the user selected a node in the node graph
|
||||
#[wasm_bindgen(js_name = selectNodes)]
|
||||
pub fn select_nodes(&self, nodes: Vec<u64>) {
|
||||
pub fn select_nodes(&self, nodes: Option<Vec<u64>>) {
|
||||
let nodes = nodes.unwrap_or_default();
|
||||
let message = NodeGraphMessage::SelectNodes { nodes };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user