Skip to content

Commit

Permalink
canvas layer: _animatingZoom is no more needed too.
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: If7e38c591e6b4b52fa16a47f4cc3f1c015ee0901
  • Loading branch information
kendy committed Dec 21, 2020
1 parent 51ba408 commit e77da33
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 18 deletions.
8 changes: 0 additions & 8 deletions loleaflet/src/layer/tile/CanvasTileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,14 +601,6 @@ L.CanvasTileLayer = L.TileLayer.extend({
paneOffset.x = Math.min(paneOffset.x, viewBounds.min.x);
paneOffset.y = Math.min(paneOffset.y, viewBounds.min.y);

// when using the pinch to zoom, set additional translation based
// on the pinch movement
if (that._map._animatingZoom) {
var centerOffset = this._map._getCenterOffset(this._map._animateToCenter);
paneOffset.x += Math.round(centerOffset.x);
paneOffset.y += Math.round(centerOffset.y);
}

// URGH -> zooming etc. (!?) ...
if (that.sheetGeometry._columns)
that.sheetGeometry._columns.forEachInCorePixelRange(
Expand Down
4 changes: 1 addition & 3 deletions loleaflet/src/layer/vector/Canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ L.Canvas = L.Renderer.extend({
},

_update: function () {
if (this._map._animatingZoom && this._bounds) { return; }

L.Renderer.prototype._update.call(this);

var b = this._bounds,
Expand Down Expand Up @@ -196,7 +194,7 @@ L.Canvas = L.Renderer.extend({
},

_onMouseMove: function (e) {
if (!this._map || this._map._animatingZoom) { return; }
if (!this._map) { return; }

var point = this._map.mouseEventToLayerPoint(e);

Expand Down
1 change: 0 additions & 1 deletion loleaflet/src/layer/vector/SVG.VML.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ L.SVG.include(!L.Browser.vml ? {} : {
},

_update: function () {
if (this._map._animatingZoom) { return; }
L.Renderer.prototype._update.call(this);
},

Expand Down
2 changes: 0 additions & 2 deletions loleaflet/src/layer/vector/SVG.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ L.SVG = L.Renderer.extend({
},

_update: function () {
if (this._map._animatingZoom && this._bounds) { return; }

L.Renderer.prototype._update.call(this);

var b = this._bounds;
Expand Down
5 changes: 1 addition & 4 deletions loleaflet/src/map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,10 +757,7 @@ L.Map = L.Evented.extend({
},

getZoom: function () {
if (this._animatingZoom) // use animation target zoom
return this._animateToZoom;
else
return this._zoom;
return this._zoom;
},

getBounds: function () {
Expand Down

0 comments on commit e77da33

Please sign in to comment.