Skip to content

Commit

Permalink
Merge pull request #2178 from CartoDB/fix-set-view
Browse files Browse the repository at this point in the history
Use setView instead of flyTo to improve zoom transitions
  • Loading branch information
Jesus89 committed Jul 13, 2018
2 parents 46c2ea9 + 253e13b commit 9c7e8f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geo/leaflet/leaflet-map-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ var LeafletMapView = MapView.extend({

_setView: function () {
if (this.map.hasChanged('zoom') || this.map.hasChanged('center')) {
this._leafletMap.flyTo(this.map.get('center'), this.map.get('zoom') || 0);
this._leafletMap.setView(this.map.get('center'), this.map.get('zoom') || 0);
}
},

Expand Down

0 comments on commit 9c7e8f0

Please sign in to comment.