From c5ac1dd44bb4bfe19777190fc98bd589d1fb26e2 Mon Sep 17 00:00:00 2001 From: DominicTheD3v <119626487+DominicTheD3v@users.noreply.github.com> Date: Sat, 31 Oct 2026 07:52:55 +0000 Subject: [PATCH] docs: add missing docstrings --- crates/engine/src/tools/drag.rs | 1 + crates/engine/src/tools/pointer.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/crates/engine/src/tools/drag.rs b/crates/engine/src/tools/drag.rs index 11392c13..dcee9cf7 100644 --- a/crates/engine/src/tools/drag.rs +++ b/crates/engine/src/tools/drag.rs @@ -13,6 +13,7 @@ struct MoveDrag { } impl Session { + /// Update the active drag interaction using the pointer position and modifiers. pub(super) fn drag(&mut self, p: Point, mods: Mods, tol: f64) -> Result { let Some(drag) = self.tool.drag.clone() else { return Ok(Value::Null) }; match drag { diff --git a/crates/engine/src/tools/pointer.rs b/crates/engine/src/tools/pointer.rs index 1f4cba0c..d049dcf3 100644 --- a/crates/engine/src/tools/pointer.rs +++ b/crates/engine/src/tools/pointer.rs @@ -220,6 +220,7 @@ impl Session { } } + /// Handle a pointer press and start the applicable tool interaction. fn down(&mut self, p: Point, mods: Mods, tol: f64) -> Result { if let Some(Drag::Freeform { mode, mut points, .. }) = self.tool.drag.clone() { // Next click of a freeform: close on the start point, else add a vertex. @@ -440,6 +441,7 @@ impl Session { Ok(json!({"hit": serde_json::to_value(&hit).unwrap_or_default()})) } + /// Handle a pointer release and finalize the active tool interaction. fn up(&mut self, p: Point, mods: Mods) -> Result { let drag = self.tool.drag.take(); self.tool.guides.clear();