Apply review fixes

- crates/engine/src/tools/pointer.rs
This commit is contained in:
aiongg
2026-11-04 20:27:31 +00:00
parent 84e2d97587
commit 913f5046ea
+1 -1
View File
@@ -552,7 +552,7 @@ impl Session {
Some(Drag::Freeform { mode, points, .. }) => {
if mode == "scribble" {
// A scribble ending back at its start closes into a filled shape.
let closed = points.len() > 3 && points.first().is_some_and(|a| (*a - p).hypot() <= 6.0);
let closed = points.len() > 3 && points.first().zip(points.last()).is_some_and(|(a, b)| (*a - *b).hypot() <= 6.0);
self.tool.drag = Some(Drag::Freeform { mode, points, pressed: false });
return self.finish_freeform(closed);
}