mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 20:38:11 +08:00
Make the transform cage resize about the pivot when Alt is pressed (#2226)
* Change the pivot behaviour when resizing bounds with alt in the select tool * Add scale factor maximum * Fix bug when encountering snapping; tidy up and comment the code --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
fb7eae8f02
commit
5a8eb9dd1b
@@ -68,6 +68,11 @@ pub const MIN_LENGTH_FOR_MIDPOINT_VISIBILITY: f64 = 20.;
|
||||
pub const MIN_LENGTH_FOR_CORNERS_VISIBILITY: f64 = 12.;
|
||||
/// When the width or height of the transform cage is less than this value, only the exterior of the bounding box will act as a click target for resizing.
|
||||
pub const MIN_LENGTH_FOR_RESIZE_TO_INCLUDE_INTERIOR: f64 = 40.;
|
||||
/// When dragging the edge of a cage with Alt, it centers around the pivot.
|
||||
/// However if the pivot is on or near the same edge you are dragging, we should avoid scaling by a massive factor caused by the small denominator.
|
||||
///
|
||||
/// The motion of the user's cursor by an `x` pixel offset results in `x * scale_factor` pixels of offset on the other side.
|
||||
pub const MAXIMUM_ALT_SCALE_FACTOR: f64 = 25.;
|
||||
|
||||
// PATH TOOL
|
||||
pub const MANIPULATOR_GROUP_MARKER_SIZE: f64 = 6.;
|
||||
|
||||
Reference in New Issue
Block a user