Back to layer and add zIndex to the container

This commit is contained in:
Francisco López 2017-03-21 17:33:21 +01:00
parent a82dbfb850
commit 8b860d4205

View File

@ -4,7 +4,7 @@ require('./leaflet_tileloader_mixin');
* full canvas layer implementation for Leaflet
*/
L.CanvasLayer = L.GridLayer.extend({
L.CanvasLayer = L.Layer.extend({
includes: [L.Mixin.Events, L.Mixin.TileLoader],
@ -186,6 +186,7 @@ L.CanvasLayer = L.GridLayer.extend({
},
setZIndex: function(zIndex) {
this._container.style.zIndex = zIndex;
this._canvas.style.zIndex = zIndex;
if (this.options.zoomAnimation) {
this._backCanvas.style.zIndex = zIndex;