Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
podusowski committed Aug 29, 2023
1 parent 3980cca commit a9c161a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ impl Widget for Map<'_, '_> {
// then it felt right with both mouse wheel, and an Android phone.
self.memory.zoom.zoom_by((zoom_delta - 1.) * 2.);
} else {
self.memory.center_mode.drag(&response, self.my_position);
self.memory
.center_mode
.recalculate_drag(&response, self.my_position);
}

self.memory.center_mode.recalculate_inertial_movement(
Expand Down Expand Up @@ -159,7 +161,7 @@ pub enum Center {
}

impl Center {
fn drag(&mut self, response: &Response, my_position: Position) {
fn recalculate_drag(&mut self, response: &Response, my_position: Position) {
if response.dragged_by(egui::PointerButton::Primary) {
*self = Center::Inertia {
position: self.position(my_position),
Expand Down

0 comments on commit a9c161a

Please sign in to comment.