mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 11:28:30 +08:00
Improve Text tool resize/drag behavior (#2428)
* Have red be below quads * Code review pt 1 * Skip rendering of pivot * Code review pt 2 * Code review pt 3 * Cancel resize and its hints * Remove the redundant placing message * Dragging state for text tool fsm * Cleanup * Fix line tool undo and abort problems * Code review * 3px textbox overflow bottom * Some more cleanup * Fix reversed match arms that had been converted to if-else --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
43275b7a1e
commit
b98711dbdb
@@ -88,10 +88,9 @@ pub struct MouseState {
|
||||
|
||||
impl MouseState {
|
||||
pub fn finish_transaction(&self, drag_start: DVec2, responses: &mut VecDeque<Message>) {
|
||||
match drag_start.distance(self.position) <= DRAG_THRESHOLD {
|
||||
true => responses.add(DocumentMessage::AbortTransaction),
|
||||
false => responses.add(DocumentMessage::EndTransaction),
|
||||
}
|
||||
let drag_too_small = drag_start.distance(self.position) <= DRAG_THRESHOLD;
|
||||
let response = if drag_too_small { DocumentMessage::AbortTransaction } else { DocumentMessage::EndTransaction };
|
||||
responses.add(response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user