diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/map.cpp | 4 | ||||
-rw-r--r-- | src/map/transform.cpp | 12 |
2 files changed, 0 insertions, 16 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp index 6e9e47fd52..3daaa87987 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -551,10 +551,6 @@ void Map::stopRotating() { update(); } -bool Map::canRotate() { - return transform.canRotate(); -} - #pragma mark - Toggles diff --git a/src/map/transform.cpp b/src/map/transform.cpp index 25aacd4838..03e06f984b 100644 --- a/src/map/transform.cpp +++ b/src/map/transform.cpp @@ -14,7 +14,6 @@ using namespace mbgl; const double D2R = M_PI / 180.0; const double M2PI = 2 * M_PI; -const double MIN_ROTATE_SCALE = 8; Transform::Transform(View &view_) : view(view_) @@ -37,7 +36,6 @@ bool Transform::resize(const uint16_t w, const uint16_t h, const float ratio, current.pixelRatio = final.pixelRatio = ratio; current.framebuffer[0] = final.framebuffer[0] = fb_w; current.framebuffer[1] = final.framebuffer[1] = fb_h; - if (!canRotate() && current.angle) _setAngle(0); constrain(current.scale, current.y); view.notify_map_change(MapChangeRegionDidChange); @@ -286,9 +284,6 @@ void Transform::_setScaleXY(const double new_scale, const double xn, const doubl constrain(final.scale, final.y); - // Undo rotation at low zooms. - if (!canRotate() && current.angle) _setAngle(0); - if (duration == 0) { current.scale = final.scale; current.x = final.x; @@ -398,9 +393,6 @@ void Transform::_setAngle(double new_angle, const timestamp duration) { final.angle = new_angle; - // Prevent rotation at low zooms. - if (!canRotate()) final.angle = 0; - if (duration == 0) { current.angle = final.angle; } else { @@ -449,10 +441,6 @@ void Transform::_clearRotating() { } } -bool Transform::canRotate() { - return (current.scale > MIN_ROTATE_SCALE); -} - #pragma mark - Transition bool Transform::needsTransition() const { |