mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 09:38:12 +08:00
Add support for exposing node parameter inputs (#866)
* Add exposing inputs to graph * Use uuids and better node positioning * Fix accidentally refering to the wrong grid spacing * Secondary input without primary input * Cleanup document node types * Rename to input and addend
This commit is contained in:
committed by
Keavon Chambers
parent
0a78ebda25
commit
3dd9e88655
@@ -553,18 +553,7 @@ impl JsEditorHandle {
|
||||
/// Creates a new document node in the node graph
|
||||
#[wasm_bindgen(js_name = createNode)]
|
||||
pub fn create_node(&self, node_type: String) {
|
||||
fn generate_node_id() -> u64 {
|
||||
static mut NODE_ID: u64 = 10;
|
||||
unsafe {
|
||||
NODE_ID += 1;
|
||||
NODE_ID
|
||||
}
|
||||
}
|
||||
|
||||
let message = NodeGraphMessage::CreateNode {
|
||||
node_id: generate_node_id(),
|
||||
node_type,
|
||||
};
|
||||
let message = NodeGraphMessage::CreateNode { node_id: None, node_type };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user