mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 03:08:12 +08:00
Add grid snapping to graph imports/exports; improve layer panel drag into/between insertion; better preserve graph space on reordering (#1911)
* Fix disconnecting root node when previewing * Final previewing fixes * Improve positioning when moving layer to stack * Improve layer panel * Import/Export edge grid snapping * Fix layer ordering and positioning * Small bug fixes and improvements * Fix copy and paste position * Nit * Align imports/edges when using scrolling * Fix misaligned exports in demo artwork --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
60707c0369
commit
193f757c45
@@ -564,6 +564,13 @@ impl EditorHandle {
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Snaps the import/export edges to a grid space when the scroll bar is released
|
||||
#[wasm_bindgen(js_name = setGridAlignedEdges)]
|
||||
pub fn set_grid_aligned_edges(&self) {
|
||||
let message = NodeGraphMessage::SetGridAlignedEdges;
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Creates a new document node in the node graph
|
||||
#[wasm_bindgen(js_name = createNode)]
|
||||
pub fn create_node(&self, node_type: String, x: i32, y: i32) {
|
||||
|
||||
Reference in New Issue
Block a user