New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-tile-loading-progress-control

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-tile-loading-progress-control - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

23

dist/Control.TileLoadingProgress.js
/* @preserve
* Leaflet Control TileLoadingProgress 1.0.4
* Leaflet Control TileLoadingProgress 1.0.5
* https://github.com/jbccollins/leaflet-tile-loading-progress-control

@@ -35,2 +35,4 @@ *

onAdd: function (map) {
var leafletElt = this.options.leafletElt;
var controlInstance = this;
var container = L.DomUtil.create('div', 'leaflet-control-progress-bar');

@@ -44,11 +46,14 @@ var loadingContainer = L.DomUtil.create('div', 'loading-container');

container.appendChild(loadingContainer);
container.appendChild(loadingText);
this.options.leafletElt.on('layeradd', function() {
this.unbindLoadEventTriggers();
this.bindLoadEventTriggers();
container.appendChild(loadingText);
leafletElt._map.on('layeradd', function(e) {
var currentLayers = leafletElt.getLayers();
for (var i = 0; i < currentLayers.length; i++) {
// If the layer added to the map is part of the layer group then we rebind the loading triggers.
if (currentLayers[i] === e.layer) {
controlInstance.unbindLoadEventTriggers();
controlInstance.bindLoadEventTriggers();
break;
}
}
});
this.options.leafletElt.on('layerremove', function() {
this.unbindLoadEventTriggers();
this.bindLoadEventTriggers();
});
this.bindLoadEventTriggers();

@@ -55,0 +60,0 @@ this.loadingForegroundElt = loadingForeground;

{
"name": "leaflet-tile-loading-progress-control",
"version": "1.0.4",
"version": "1.0.5",
"description": "A leaflet control that indicates tile loading progress for a group of tile layers",

@@ -5,0 +5,0 @@ "main": "dist/Control.TileLoadingProgress.js",

@@ -21,2 +21,4 @@ import L from 'leaflet';

onAdd: function (map) {
var leafletElt = this.options.leafletElt;
var controlInstance = this;
var container = L.DomUtil.create('div', 'leaflet-control-progress-bar');

@@ -30,11 +32,14 @@ var loadingContainer = L.DomUtil.create('div', 'loading-container');

container.appendChild(loadingContainer);
container.appendChild(loadingText);
this.options.leafletElt.on('layeradd', function() {
this.unbindLoadEventTriggers();
this.bindLoadEventTriggers();
container.appendChild(loadingText);
leafletElt._map.on('layeradd', function(e) {
var currentLayers = leafletElt.getLayers();
for (var i = 0; i < currentLayers.length; i++) {
// If the layer added to the map is part of the layer group then we rebind the loading triggers.
if (currentLayers[i] === e.layer) {
controlInstance.unbindLoadEventTriggers();
controlInstance.bindLoadEventTriggers();
break;
}
}
});
this.options.leafletElt.on('layerremove', function() {
this.unbindLoadEventTriggers();
this.bindLoadEventTriggers();
});
this.bindLoadEventTriggers();

@@ -41,0 +46,0 @@ this.loadingForegroundElt = loadingForeground;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc