mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 01:18:12 +08:00
Artboard history (#976)
* Convert DocumentSave to struct * Comit the artboard history save in some cases * Cause index out of bounds error * Use box to avoid weird wasm error * Implement the artboard history Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
f0705a46fd
commit
ae445f6c64
@@ -190,6 +190,8 @@ impl Fsm for ArtboardToolFsmState {
|
||||
};
|
||||
|
||||
if let Some(selected_edges) = dragging_bounds {
|
||||
responses.push_back(DocumentMessage::StartTransaction.into());
|
||||
|
||||
let snap_x = selected_edges.2 || selected_edges.3;
|
||||
let snap_y = selected_edges.0 || selected_edges.1;
|
||||
|
||||
@@ -206,6 +208,7 @@ impl Fsm for ArtboardToolFsmState {
|
||||
|
||||
ArtboardToolFsmState::ResizingBounds
|
||||
} else {
|
||||
responses.push_back(DocumentMessage::StartTransaction.into());
|
||||
let tolerance = DVec2::splat(SELECTION_TOLERANCE);
|
||||
let quad = Quad::from_box([input.mouse.position - tolerance, input.mouse.position + tolerance]);
|
||||
let intersection = document.artboard_message_handler.artboards_document.intersects_quad_root(quad, font_cache);
|
||||
|
||||
Reference in New Issue
Block a user