Layer snapping

* Test snapping

* Snap new shapes

* Fix snapping when zoomed

* Refactor to use viewport bounds

* Reduce snap tolerance to 3

* Snap line and path tool

* Add disable snapping and refactor

* new_snap -> new status

* Rearrange import

* Cleanup

* Fix incorrect variable name

* Store snap data in tool data
This commit is contained in:
0HyperCube
2021-11-24 16:50:58 +00:00
committed by GitHub
parent 7cb80359df
commit bf1706b698
13 changed files with 229 additions and 46 deletions
+2
View File
@@ -15,6 +15,8 @@ pub const VIEWPORT_SCROLL_RATE: f64 = 0.6;
pub const VIEWPORT_ROTATE_SNAP_INTERVAL: f64 = 15.;
pub const SNAP_TOLERANCE: f64 = 3.;
// TRANSFORMING LAYER
pub const ROTATE_SNAP_ANGLE: f64 = 15.;
pub const SCALE_SNAP_INTERVAL: f64 = 0.1;