mirror of
https://github.com/storytold/AniCraft.git
synced 2026-11-29 01:24:08 +01:00
fix(transform): skew doesn't snap; wire the control module after the merge (M8)
This commit is contained in:
1 parent
6f1adc4ea2
commit
c5a406cb05
2 files changed
+4
-1
No files matched your search
@@ -78,6 +78,8 @@ mod macros_ui;
|
||||
mod plugins_ui;
|
||||
mod prefs;
|
||||
mod recent;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
mod remote;
|
||||
mod rulers;
|
||||
mod scale_grid;
|
||||
mod shape_envelope;
|
||||
|
||||
+2
-1
@@ -1362,7 +1362,8 @@ fn xf_snap(s: &mut anicraft_engine::Session, ring: &mut Option<Vec2>, kind: XfKi
|
||||
let pts = [pos2(b[0], b[1]), pos2(b[2], b[1]), pos2(b[2], b[3]), pos2(b[0], b[3]), pos2((b[0] + b[2]) * 0.5, (b[1] + b[3]) * 0.5)];
|
||||
pts.into_iter().min_by(|p, q| p.distance(start).total_cmp(&q.distance(start))).unwrap_or(start)
|
||||
}
|
||||
XfKind::Rotate => {
|
||||
// Rotation and skew don't snap.
|
||||
XfKind::Rotate | XfKind::Skew { .. } => {
|
||||
*ring = None;
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user