From 297dc8869caa5ac17cd4f6dd35e5c3b5fadcc89c Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Wed, 16 Dec 2020 09:10:44 +0000 Subject: [PATCH] 1.4.2 --- dist/L.Deflate.js | 2 +- dist/L.Deflate.js.map | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/L.Deflate.js b/dist/L.Deflate.js index 971b416..5cd177d 100644 --- a/dist/L.Deflate.js +++ b/dist/L.Deflate.js @@ -1 +1 @@ -"use strict";L.Layer.include({_originalRemove:L.Layer.prototype.remove,remove:function(){if(this.marker){this.marker.remove()}return this._originalRemove()}});L.Map.include({_originalRemoveLayer:L.Map.prototype.removeLayer,removeLayer:function(layer){if(layer.marker){layer.marker.remove()}return this._originalRemoveLayer(layer)}});L.Deflate=L.FeatureGroup.extend({options:{minSize:10,markerCluster:false,markerOptions:{},markerClusterOptions:{},markerType:L.marker},initialize:function(options){L.Util.setOptions(this,options);this._layers=[];this._needsPrepping=[];this._featureLayer=this._getFeatureLayer(options)},_getFeatureLayer:function(){if(this.options.markerLayer){return this.options.markerLayer}if(this.options.markerCluster){console.warn("The options markerCluster and markerClusterOptions will be removed in the next major version of Leaflet.Deflate. Use the markerLayer option to inject a MarkerClusterGroup instance.");return L.markerClusterGroup(this.options.markerClusterOptions)}return L.featureGroup(this.options)},_getBounds:function(path){if(path instanceof L.Circle){path.addTo(this._map);const bounds=path.getBounds();this._map.removeLayer(path);return bounds}return path.getBounds()},_isCollapsed:function(path,zoom){const bounds=path.computedBounds;const northEastPixels=this._map.project(bounds.getNorthEast(),zoom);const southWestPixels=this._map.project(bounds.getSouthWest(),zoom);const width=Math.abs(northEastPixels.x-southWestPixels.x);const height=Math.abs(southWestPixels.y-northEastPixels.y);return height