Merge pull request #284 from CartoDB/leaflet-migration
Migrate to leaflet 1.0.3
This commit is contained in:
commit
f9e6b4f2f9
@ -4,7 +4,7 @@ require('./leaflet_tileloader_mixin');
|
||||
* full canvas layer implementation for Leaflet
|
||||
*/
|
||||
|
||||
L.CanvasLayer = L.Class.extend({
|
||||
L.CanvasLayer = L.Layer.extend({
|
||||
|
||||
includes: [L.Mixin.Events, L.Mixin.TileLoader],
|
||||
|
||||
@ -134,7 +134,7 @@ L.CanvasLayer = L.Class.extend({
|
||||
var bg = back;
|
||||
var transform = L.DomUtil.TRANSFORM;
|
||||
setTimeout(function() {
|
||||
bg.style[transform] = L.DomUtil.getTranslateString(origin) + ' scale(' + e.scale + ') ';
|
||||
bg.style[transform] = 'translate(' + origin.x + 'px, ' + origin.y + 'px) scale(' + e.scale + ') ';
|
||||
}, 0)
|
||||
},
|
||||
|
||||
@ -186,6 +186,8 @@ L.CanvasLayer = L.Class.extend({
|
||||
},
|
||||
|
||||
setZIndex: function(zIndex) {
|
||||
zIndex = zIndex !== void 0 ? zIndex : 1;
|
||||
this._container.style.zIndex = zIndex;
|
||||
this._canvas.style.zIndex = zIndex;
|
||||
if (this.options.zoomAnimation) {
|
||||
this._backCanvas.style.zIndex = zIndex;
|
||||
|
@ -99,7 +99,7 @@ L.Mixin.TileLoader = {
|
||||
|
||||
getTilePos: function (tilePoint) {
|
||||
tilePoint = new L.Point(tilePoint.x, tilePoint.y);
|
||||
var origin = this._map._getNewTopLeftPoint(this._map.getCenter()),
|
||||
var origin = this._map._getTopLeftPoint(this._map.getCenter()),
|
||||
tileSize = this.options.tileSize;
|
||||
|
||||
return tilePoint.multiplyBy(tileSize).subtract(origin);
|
||||
|
@ -31,7 +31,7 @@
|
||||
"devDependencies": {
|
||||
"browserify": "~7.0.0",
|
||||
"canvas": "~1.2.1",
|
||||
"leaflet": "0.7.3",
|
||||
"leaflet": "1.0.3",
|
||||
"mapnik": "cartodb/node-mapnik#1.4.15-cdb8",
|
||||
"node-qunit-phantomjs": "1.3.0",
|
||||
"phantomjs-polyfill": "0.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user