mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 03:58:12 +08:00
Further polishing of G/R/S visualization and features (#2243)
* Further polishing of G/R/S visualisation and features Followup to #2229. * Begin typing only if constrained or not in G * Prevent adding empty group in R mode. Order fn alphabetically as was before * Always show typing hints unless can't begin typing * Fix one frame bug * Add cancel and confirm groups for GRS hints * Fix inconsistency in call increments, snaps * Use top/bottom left/right methods with quads where more readable * Fix inconsistent use of narrow/flat * Add hints to transform cage Fixes https://discord.com/channels/731730685944922173/881073965047636018/939265895509925898. * Rename some hints * Fix scale radial behaviour, grab constraints and local edge orientation * Fix not being able to remove the whole selection with delete modifier Fixes https://discord.com/channels/731730685944922173/881073965047636018/1336221441716391937. * Fix compiling * Fix crash when single point bbox Fixes #2267 * Fix the same crash in scale and use better name for bbox * cargo fmt --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
da752e5324
commit
4de65c292a
@@ -507,9 +507,9 @@ impl BoundingBoxManager {
|
||||
let cursor = self.transform.inverse().transform_point2(cursor);
|
||||
let [threshold_x, threshold_y] = self.compute_viewport_threshold(BOUNDS_ROTATE_THRESHOLD);
|
||||
|
||||
let narrow = (self.bounds[0] - self.bounds[1]).abs().cmple(DVec2::splat(1e-4)).any();
|
||||
let flat = (self.bounds[0] - self.bounds[1]).abs().cmple(DVec2::splat(1e-4)).any();
|
||||
let within_square_bounds = |center: &DVec2| center.x - threshold_x < cursor.x && cursor.x < center.x + threshold_x && center.y - threshold_y < cursor.y && cursor.y < center.y + threshold_y;
|
||||
if narrow {
|
||||
if flat {
|
||||
[self.bounds[0], self.bounds[1]].iter().any(within_square_bounds)
|
||||
} else {
|
||||
self.evaluate_transform_handle_positions().iter().any(within_square_bounds)
|
||||
|
||||
Reference in New Issue
Block a user