mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Canvas: document filter_event_before_tool
This commit is contained in:
1 parent
8967dbe5f3
commit
33afe59583
1 file changed
+5
@@ -109,6 +109,11 @@ fn preflight_tool_event(app: &mut PhotocraftApp, ev: ToolEvent, mods: egui::Modi
|
||||
Some((armed, mods))
|
||||
}
|
||||
|
||||
/// The handlers a pointer event meets before the tool: dropping a floating piece the press won't
|
||||
/// drag, snapping, and the overlays and modifier gestures (Free Transform, sticky keys, brush
|
||||
/// resize, the ⌥ eyedropper, path and shape widgets…) that take the event for themselves. `None`:
|
||||
/// one of them handled it; otherwise the event before and after snapping, and the modifiers
|
||||
/// with the sticky keys applied.
|
||||
fn filter_event_before_tool(app: &mut PhotocraftApp, ev: ToolEvent, mods: egui::Modifiers, armed: bool) -> Option<(ToolEvent, ToolEvent, egui::Modifiers)> {
|
||||
// View › Snap / Snap To and smart guides (snap_ui.rs).
|
||||
let raw = ev;
|
||||
|
||||
Reference in new issue
Block a user