mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-02 06:47:11 -06:00
autoscroll: note the no-pointer case in paint
This commit is contained in:
@@ -152,6 +152,7 @@ impl AutoScroll {
|
||||
Stroke::NONE,
|
||||
));
|
||||
}
|
||||
// No pointer position (outside the window) counts as the dead zone: `update` cancels the gesture then.
|
||||
let displacement = ui.ctx().input(|i| i.pointer.hover_pos()).map_or(0.0, |p| p.y - anchor.y);
|
||||
ui.ctx().set_cursor_icon(cursor_icon(displacement));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user