From 104100eb2aff7292eec066bafb4f58f78775f421 Mon Sep 17 00:00:00 2001 From: Matti Puputti Date: Sat, 7 Aug 2021 09:31:33 +0200 Subject: [PATCH 1/2] Update ActiveLayers.js Updated to work with Leaflet 1.4.0 --- bower.json | 24 ------------------------ dist/leaflet.active-layers.min.js | 4 ++-- package.json | 4 ++-- src/ActiveLayers.js | 13 +++++++++---- 4 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 bower.json diff --git a/bower.json b/bower.json deleted file mode 100644 index 07cc69d..0000000 --- a/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "leaflet.active-layers", - "version": "0.3.0", - "homepage": "https://github.com/vogdb/Leaflet.ActiveLayers", - "authors": [ - "vogdb" - ], - "description": "Leaflet - get currently active layers on the map.", - "main": "./dist/leaflet.active-layers.min.js", - "keywords": [ - "leaflet", - "mapbox" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "app/bower_components", - "test", - "tests" - ] -} - diff --git a/dist/leaflet.active-layers.min.js b/dist/leaflet.active-layers.min.js index 838c45e..187066b 100644 --- a/dist/leaflet.active-layers.min.js +++ b/dist/leaflet.active-layers.min.js @@ -1,5 +1,5 @@ /** * Created: vogdb Date: 5/4/13 Time: 1:54 PM - * Version: 0.3.0 + * Version: 0.3.1 */ -L.Control.ActiveLayers=L.Control.Layers.extend({getActiveBaseLayer:function(){return this._activeBaseLayer},getActiveOverlayLayers:function(){return this._activeOverlayLayers},onAdd:function(e){var t=L.Control.Layers.prototype.onAdd.call(this,e);return Array.isArray(this._layers)?(this._activeBaseLayer=this._findActiveBaseLayer(),this._activeOverlayLayers=this._findActiveOverlayLayers()):(this._activeBaseLayer=this._findActiveBaseLayerLegacy(),this._activeOverlayLayers=this._findActiveOverlayLayersLegacy()),t},_findActiveBaseLayer:function(){var e=this._layers;for(var t=0;t Date: Sun, 8 Aug 2021 23:17:02 +0200 Subject: [PATCH 2/2] update leaflet dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 559c56f..61ba792 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ } ], "dependencies": { - "leaflet": "~1.4" + "leaflet": ">0.7" }, "devDependencies": { "grunt-contrib-watch": "~0.3.1",