|
|
@@ -91,7 +91,12 @@ impl MapView {
|
|
91
|
91
|
let tile_screen_size = f64::powf(2.0, self.zoom - f64::from(uzoom)) * f64::from(self.tile_size);
|
|
92
|
92
|
|
|
93
|
93
|
if snap_to_pixel {
|
|
94
|
|
- top_left_tile_screen_coord.snap_to_pixel();
|
|
|
94
|
+ // only snap to pixel if apparent zoom is integer
|
|
|
95
|
+ let apparent_zoom = self.zoom + self.tile_zoom_offset;
|
|
|
96
|
+ let apparent_zoom_int = (apparent_zoom + 0.5).floor();
|
|
|
97
|
+ if (apparent_zoom - apparent_zoom_int).abs() < 1e-10 {
|
|
|
98
|
+ top_left_tile_screen_coord.snap_to_pixel();
|
|
|
99
|
+ }
|
|
95
|
100
|
}
|
|
96
|
101
|
|
|
97
|
102
|
let start_tile_x = top_left_tile.x;
|