mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 07:18:11 +08:00
Improve the node graph with revamped top bar and disabling tools when graph is open (#2093)
* Add "Fade Artwork" slider and disable tools when graph is open * Add navigation and layer/node management buttons to graph top bar * Reduce code duplication
This commit is contained in:
@@ -577,8 +577,7 @@ impl EditorHandle {
|
||||
let message = NodeGraphMessage::CreateNodeFromContextMenu {
|
||||
node_id: Some(id),
|
||||
node_type,
|
||||
x: x / 24,
|
||||
y: y / 24,
|
||||
xy: Some((x / 24, y / 24)),
|
||||
};
|
||||
self.dispatch(message);
|
||||
}
|
||||
@@ -652,10 +651,10 @@ impl EditorHandle {
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Unpin a node given its node ID
|
||||
#[wasm_bindgen(js_name = unpinNode)]
|
||||
pub fn unpin_node(&self, id: u64) {
|
||||
self.dispatch(DocumentMessage::SetNodePinned { node_id: NodeId(id), pinned: false });
|
||||
/// Pin or unpin a node given its node ID
|
||||
#[wasm_bindgen(js_name = setNodePinned)]
|
||||
pub fn set_node_pinned(&self, id: u64, pinned: bool) {
|
||||
self.dispatch(DocumentMessage::SetNodePinned { node_id: NodeId(id), pinned });
|
||||
}
|
||||
|
||||
/// Delete a layer or node given its node ID
|
||||
|
||||
Reference in New Issue
Block a user