mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 10:08:13 +08:00
Snapping system improvements and refactor (#621)
* Snap to points and refactor * Improve dot position on bounds * Add snap matrix * Cleanup * Code review * Half axis fade rather than increase it * Fix fmt * Hide snap to point overlay when active Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
f177f63217
commit
79d40fa451
+11
-3
@@ -15,9 +15,17 @@ pub const VIEWPORT_SCROLL_RATE: f64 = 0.6;
|
||||
|
||||
pub const VIEWPORT_ROTATE_SNAP_INTERVAL: f64 = 15.;
|
||||
|
||||
pub const SNAP_TOLERANCE: f64 = 3.;
|
||||
pub const SNAP_OVERLAY_FADE_DISTANCE: f64 = 20.;
|
||||
pub const SNAP_OVERLAY_UNSNAPPED_OPACITY: f64 = 0.4;
|
||||
// Snapping axis
|
||||
pub const SNAP_AXIS_TOLERANCE: f64 = 3.;
|
||||
pub const SNAP_AXIS_OVERLAY_FADE_DISTANCE: f64 = 15.;
|
||||
pub const SNAP_AXIS_UNSNAPPED_OPACITY: f64 = 0.4;
|
||||
|
||||
// Snapping point
|
||||
pub const SNAP_POINT_OVERLAY_FADE_NEAR: f64 = 20.;
|
||||
pub const SNAP_POINT_OVERLAY_FADE_FAR: f64 = 40.;
|
||||
pub const SNAP_POINT_UNSNAPPED_OPACITY: f64 = 0.4;
|
||||
pub const SNAP_POINT_TOLERANCE: f64 = 5.;
|
||||
pub const SNAP_POINT_SIZE: f64 = 5.;
|
||||
|
||||
pub const DRAG_THRESHOLD: f64 = 1.;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user