[core] Always constrain width for zoom level
Even if the map supports wrapping the world, it isn’t necessary to show more than one full revolution of the world at a time. Removed a redundant zoom level clamp.
This commit is contained in:
committed by
Minh Nguyễn
parent
58264408c8
commit
63820d1b4f
@@ -212,13 +212,6 @@ double Transform::getScale() const {
|
||||
}
|
||||
|
||||
void Transform::_setScale(double new_scale, const PrecisionPoint& center, const Duration& duration) {
|
||||
// Ensure that we don't zoom in further than the maximum allowed.
|
||||
if (new_scale < state.min_scale) {
|
||||
new_scale = state.min_scale;
|
||||
} else if (new_scale > state.max_scale) {
|
||||
new_scale = state.max_scale;
|
||||
}
|
||||
|
||||
const double factor = new_scale / state.scale;
|
||||
double dx = 0;
|
||||
double dy = 0;
|
||||
|
||||
Reference in New Issue
Block a user