|
|
@@ -101,10 +101,8 @@ impl MapView {
|
|
101
|
101
|
let tile_screen_size = f64::powf(2.0, self.zoom - f64::from(uzoom)) * f64::from(self.tile_size);
|
|
102
|
102
|
|
|
103
|
103
|
if snap_to_pixel {
|
|
104
|
|
- // only snap to pixel if apparent zoom is integer
|
|
105
|
|
- let apparent_zoom = self.zoom + self.tile_zoom_offset;
|
|
106
|
|
- let apparent_zoom_int = (apparent_zoom + 0.5).floor();
|
|
107
|
|
- if (apparent_zoom - apparent_zoom_int).abs() < 1e-10 {
|
|
|
104
|
+ // only snap to pixel if zoom has integral value
|
|
|
105
|
+ if (self.zoom - (self.zoom + 0.5).floor()).abs() < 1e-10 {
|
|
108
|
106
|
top_left_tile_screen_coord.snap_to_pixel();
|
|
109
|
107
|
}
|
|
110
|
108
|
}
|