Update leaflet loading to version 0.1.24

This commit is contained in:
David Molineus
2017-01-27 12:06:34 +01:00
parent df8851fc8b
commit 21fd7c8bd3
11 changed files with 42 additions and 27 deletions

View File

@@ -16,7 +16,7 @@ This package contains following packages:
- [Leaflet-providers 1.1.15](http://leaflet-extras.github.io/leaflet-providers) - [Leaflet-providers 1.1.15](http://leaflet-extras.github.io/leaflet-providers)
- [Leaflet.markercluster 1.0.2](https://github.com/Leaflet/Leaflet.markercluster) - [Leaflet.markercluster 1.0.2](https://github.com/Leaflet/Leaflet.markercluster)
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore) - [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
- [Leaflet.loading 0.1.23](https://github.com/ebrelsford/Leaflet.loading) - [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)
- [Leaflet.Control.FullScreen 1.4.2](https://github.com/brunob/leaflet.fullscreen) - [Leaflet.Control.FullScreen 1.4.2](https://github.com/brunob/leaflet.fullscreen)
- [Leaflet Control Geocoder 1.5.4](https://github.com/perliedman/leaflet-control-geocoder) - [Leaflet Control Geocoder 1.5.4](https://github.com/perliedman/leaflet-control-geocoder)
- [Leaflet.ExtraMarkers 1.0.6](https://github.com/coryasilva/Leaflet.ExtraMarkers) - [Leaflet.ExtraMarkers 1.0.6](https://github.com/coryasilva/Leaflet.ExtraMarkers)

View File

@@ -18,3 +18,4 @@ Your pull requests are very welcome! Please follow these guidelines:
* [kcwu](https://github.com/kcwu) * [kcwu](https://github.com/kcwu)
* [Robbie Trencheny](https://github.com/robbiet480) * [Robbie Trencheny](https://github.com/robbiet480)
* [David Molineus](https://github.com/dmolineus) * [David Molineus](https://github.com/dmolineus)
* [Marwen Arfa](https://github.com/arfa)

View File

@@ -5,14 +5,16 @@
} }
.leaflet-control-loading, .leaflet-control-loading,
.leaflet-control-zoom a.leaflet-control-loading , .leaflet-control-zoom a.leaflet-control-loading,
.leaflet-control-zoomslider a.leaflet-control-loading { .leaflet-control-zoomslider a.leaflet-control-loading,
.leaflet-control-layer-container {
display: none; display: none;
} }
.leaflet-control-loading.is-loading, .leaflet-control-loading.is-loading,
.leaflet-control-zoom a.leaflet-control-loading.is-loading, .leaflet-control-zoom a.leaflet-control-loading.is-loading,
.leaflet-control-zoomslider a.leaflet-control-loading.is-loading { .leaflet-control-zoomslider a.leaflet-control-loading.is-loading,
.leaflet-control-layer-container.is-loading {
display: block; display: block;
} }

View File

@@ -71,8 +71,9 @@
} }
else { else {
// Otherwise, create a container for the indicator // Otherwise, create a container for the indicator
container = L.DomUtil.create('div', 'leaflet-control-zoom leaflet-bar'); container = L.DomUtil.create('div', 'leaflet-control-zoom leaflet-control-layer-container leaflet-bar');
} }
this._indicatorContainer = container;
this._indicator = L.DomUtil.create('a', classes, container); this._indicator = L.DomUtil.create('a', classes, container);
if (this.options.spinjs) { if (this.options.spinjs) {
this._spinner = new Spinner(this.options.spin).spin(); this._spinner = new Spinner(this.options.spin).spin();
@@ -156,6 +157,7 @@
_showIndicator: function() { _showIndicator: function() {
// Show loading indicator // Show loading indicator
L.DomUtil.addClass(this._indicator, 'is-loading'); L.DomUtil.addClass(this._indicator, 'is-loading');
L.DomUtil.addClass(this._indicatorContainer, 'is-loading');
// If zoomControl exists, make the zoom-out button not last // If zoomControl exists, make the zoom-out button not last
if (!this.options.separate) { if (!this.options.separate) {
@@ -171,6 +173,7 @@
_hideIndicator: function() { _hideIndicator: function() {
// Hide loading indicator // Hide loading indicator
L.DomUtil.removeClass(this._indicator, 'is-loading'); L.DomUtil.removeClass(this._indicator, 'is-loading');
L.DomUtil.removeClass(this._indicatorContainer, 'is-loading');
// If zoomControl exists, make the zoom-out button last // If zoomControl exists, make the zoom-out button last
if (!this.options.separate) { if (!this.options.separate) {

View File

@@ -1 +1 @@
.leaflet-control-loading:empty{background-image:url('data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+v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NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==');background-repeat:no-repeat}.leaflet-control-loading,.leaflet-control-zoom a.leaflet-control-loading,.leaflet-control-zoomslider a.leaflet-control-loading{display:none}.leaflet-control-loading.is-loading,.leaflet-control-zoom a.leaflet-control-loading.is-loading,.leaflet-control-zoomslider a.leaflet-control-loading.is-loading{display:block}.leaflet-bar-part-bottom{border-bottom:medium none;border-bottom-left-radius:4px;border-bottom-right-radius:4px} .leaflet-control-loading:empty{background-image:url('data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAAKAAEALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQACgACACwAAAA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rCgcxky0JRWE1AmwpKyEAIfkEAAoACAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAAKAAkALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQACgAKACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==');background-repeat:no-repeat}.leaflet-control-layer-container,.leaflet-control-loading,.leaflet-control-zoom a.leaflet-control-loading,.leaflet-control-zoomslider a.leaflet-control-loading{display:none}.leaflet-control-layer-container.is-loading,.leaflet-control-loading.is-loading,.leaflet-control-zoom a.leaflet-control-loading.is-loading,.leaflet-control-zoomslider a.leaflet-control-loading.is-loading{display:block}.leaflet-bar-part-bottom{border-bottom:medium none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}

File diff suppressed because one or more lines are too long

View File

@@ -4,19 +4,22 @@ Leaflet.loading
Leaflet.loading is a simple loading control for [Leaflet][]. An unobtrusive Leaflet.loading is a simple loading control for [Leaflet][]. An unobtrusive
loading indicator is added below the zoom control if one exists. The indicator loading indicator is added below the zoom control if one exists. The indicator
is visible when tiles are loading or when other data is loading, as indicated by is visible when tiles are loading or when other data is loading, as indicated by
firing custom events on a map. The indicator can be an image, or a [spin.js][] firing custom events on a map. The indicator can be an image, or a [spin.js][]
spinner (image-less). spinner (image-less).
## Usage ## Usage
Leaflet.loading is only tested on Leaflet version 0.6 or greater. It will almost Leaflet.loading is only tested on Leaflet version 0.6 or greater. It will almost
certainly not work with older versions of Leaflet. certainly not work with older versions of Leaflet. Of course we intend to
support Leaflet 1.0, and we have tested against the latest release (beta 2).
Please create an issue if you find that any part of this project is not
compatible with Leaflet 1.0.
Include `Control.Loading.js` and `Control.Loading.css`, then create a map with Include `Control.Loading.js` and `Control.Loading.css`, then create a map with
`loadingControl: true` in its options. `loadingControl: true` in its options.
By default, Leaflet.loading includes a base64-encoded animagted loading image in By default, Leaflet.loading includes a base64-encoded animagted loading image in
`Control.Loading.css`. You can customize this by changing `background-image` for `Control.Loading.css`. You can customize this by changing `background-image` for
the selector `.leaflet-control-loading`. The simplest case would be adding a 16 the selector `.leaflet-control-loading`. The simplest case would be adding a 16
x 16 loading gif in `.leaflet-control-loading`. x 16 loading gif in `.leaflet-control-loading`.
@@ -28,13 +31,14 @@ initializing the control.
Whichever method you use, make sure you only use one. Whichever method you use, make sure you only use one.
Once the above is complete you will have a loading indicator that only appears Once the above is complete you will have a loading indicator that only appears
when tiles are loading. when tiles are loading.
If you want to show the loading indicator while other AJAX requests or something If you want to show the loading indicator while other AJAX requests or something
else is occurring, simply fire the `dataloading` event on your map when you else is occurring, fire the `dataloading` event on your map when you begin
begin loading and `dataload` when you are finished loading. The control tracks loading and `dataload` when you are finished loading. Please note that there is
the number of concurrent loaders, so it is your responsibility to ensure that [an issue](https://github.com/ebrelsford/Leaflet.loading/issues/26) with the
the `dataloading` and `dataload` are called symmetrically. way this control tracks these events and that this will be re-worked in a
future version.
### Options ### Options
@@ -43,20 +47,22 @@ the `dataloading` and `dataload` are called symmetrically.
- **separate**: (boolean) Whether the control should be separate from the zoom - **separate**: (boolean) Whether the control should be separate from the zoom
control or not, defaults to false. control or not, defaults to false.
- **zoomControl**: (L.Control.Zoom) The zoom control that the control should be - **zoomControl**: (L.Control.Zoom) The zoom control that the control should be
added to. This is only necessary when adding a loading control to a zoom added to. This is only necessary when adding a loading control to a zoom
control that you added manually and do not want a separate loading control. control that you added manually and do not want a separate loading control.
- **spinjs**: (boolean) Enable the use of [spin.js][]. Optional, defaults to - **delayIndicator**: (float) The number of milliseconds to wait before
showing the loading indicator. Defaults to `null` (no delay).
- **spinjs**: (boolean) Enable the use of [spin.js][]. Optional, defaults to
`false` `false`
- **spin**: (object) A [spin.js][] options object. Optional, defaults to - **spin**: (object) A [spin.js][] options object. Optional, defaults to
``` ```
{ {
lines: 7, lines: 7,
length: 3, length: 3,
width: 3, width: 3,
radius: 5, radius: 5,
rotate: 13, rotate: 13,
top: "83%" top: "83%"
} }
``` ```

View File

@@ -1,12 +1,15 @@
{ {
"name": "leaflet.loading", "name": "leaflet.loading",
"version": "0.1.16", "version": "0.1.24",
"homepage": "https://github.com/ebrelsford/leaflet.loading", "homepage": "https://github.com/ebrelsford/leaflet.loading",
"authors": [ "authors": [
"Eric Brelsford <ebrelsford@gmail.com>" "Eric Brelsford <ebrelsford@gmail.com>"
], ],
"description": "A loading-indicator control for Leaflet", "description": "A loading-indicator control for Leaflet",
"main": "src/Control.Loading.js", "main": [
"src/Control.Loading.css",
"src/Control.Loading.js"
],
"keywords": [ "keywords": [
"leaflet", "leaflet",
"map", "map",

View File

@@ -1,6 +1,6 @@
{ {
"name": "leaflet-loading", "name": "leaflet-loading",
"version": "0.1.16", "version": "0.1.24",
"description": "A simple loading control for Leaflet", "description": "A simple loading control for Leaflet",
"main": "src/Control.Loading.js", "main": "src/Control.Loading.js",
"scripts": { "scripts": {

File diff suppressed because one or more lines are too long

View File

@@ -55,7 +55,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-omnivore'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array
( (
'name' => 'Leaflet.loading', 'name' => 'Leaflet.loading',
'version' => '0.1.23', 'version' => '0.1.24',
'license' => '<a href="https://github.com/ebrelsford/Leaflet.loading/blob/master/LICENSE" target="_blank">MIT</a>', 'license' => '<a href="https://github.com/ebrelsford/Leaflet.loading/blob/master/LICENSE" target="_blank">MIT</a>',
'homepage' => 'https://github.com/ebrelsford/Leaflet.loading', 'homepage' => 'https://github.com/ebrelsford/Leaflet.loading',
'css' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.min.css', 'css' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.min.css',