mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 00:08:12 +08:00
Layer snapping
* Test snapping * Snap new shapes * Fix snapping when zoomed * Refactor to use viewport bounds * Reduce snap tolerance to 3 * Snap line and path tool * Add disable snapping and refactor * new_snap -> new status * Rearrange import * Cleanup * Fix incorrect variable name * Store snap data in tool data
This commit is contained in:
committed by
Keavon Chambers
parent
26835d8d29
commit
0e33498b9b
@@ -326,6 +326,13 @@ pub fn export_document() {
|
||||
dispatch(message);
|
||||
}
|
||||
|
||||
/// Set snapping disabled / enabled
|
||||
#[wasm_bindgen]
|
||||
pub fn set_snapping(new_status: bool) {
|
||||
let message = DocumentMessage::SetSnapping(new_status);
|
||||
dispatch(message);
|
||||
}
|
||||
|
||||
/// Sets the zoom to the value
|
||||
#[wasm_bindgen]
|
||||
pub fn set_canvas_zoom(new_zoom: f64) {
|
||||
|
||||
Reference in New Issue
Block a user