[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:
Minh Nguyễn
2015-12-23 10:06:51 -08:00
committed by Minh Nguyễn
parent 58264408c8
commit 63820d1b4f
2 changed files with 3 additions and 12 deletions

View File

@@ -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;