mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-23 07:35:02 +00: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:
parent
0a78ebda25
commit
3dd9e88655
8 changed files with 174 additions and 109 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue