forked from Snck3rs/contao-leaflet-libraries
Update leaflet loading to version 0.1.24
This commit is contained in:
@@ -18,3 +18,4 @@ Your pull requests are very welcome! Please follow these guidelines:
|
||||
* [kcwu](https://github.com/kcwu)
|
||||
* [Robbie Trencheny](https://github.com/robbiet480)
|
||||
* [David Molineus](https://github.com/dmolineus)
|
||||
* [Marwen Arfa](https://github.com/arfa)
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
}
|
||||
|
||||
.leaflet-control-loading,
|
||||
.leaflet-control-zoom a.leaflet-control-loading ,
|
||||
.leaflet-control-zoomslider a.leaflet-control-loading {
|
||||
.leaflet-control-zoom a.leaflet-control-loading,
|
||||
.leaflet-control-zoomslider a.leaflet-control-loading,
|
||||
.leaflet-control-layer-container {
|
||||
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 {
|
||||
.leaflet-control-zoomslider a.leaflet-control-loading.is-loading,
|
||||
.leaflet-control-layer-container.is-loading {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,8 +71,9 @@
|
||||
}
|
||||
else {
|
||||
// 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);
|
||||
if (this.options.spinjs) {
|
||||
this._spinner = new Spinner(this.options.spin).spin();
|
||||
@@ -156,6 +157,7 @@
|
||||
_showIndicator: function() {
|
||||
// Show loading indicator
|
||||
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 (!this.options.separate) {
|
||||
@@ -171,6 +173,7 @@
|
||||
_hideIndicator: function() {
|
||||
// Hide loading indicator
|
||||
L.DomUtil.removeClass(this._indicator, 'is-loading');
|
||||
L.DomUtil.removeClass(this._indicatorContainer, 'is-loading');
|
||||
|
||||
// If zoomControl exists, make the zoom-out button last
|
||||
if (!this.options.separate) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
.leaflet-control-loading:empty{background-image:url('data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAAKAAEALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQACgACACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQACgADACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LR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0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQACgAKACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+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+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlW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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
@@ -4,19 +4,22 @@ Leaflet.loading
|
||||
Leaflet.loading is a simple loading control for [Leaflet][]. An unobtrusive
|
||||
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
|
||||
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).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
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
|
||||
`loadingControl: true` in its options.
|
||||
Include `Control.Loading.js` and `Control.Loading.css`, then create a map with
|
||||
`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
|
||||
the selector `.leaflet-control-loading`. The simplest case would be adding a 16
|
||||
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.
|
||||
|
||||
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
|
||||
else is occurring, simply fire the `dataloading` event on your map when you
|
||||
begin loading and `dataload` when you are finished loading. The control tracks
|
||||
the number of concurrent loaders, so it is your responsibility to ensure that
|
||||
the `dataloading` and `dataload` are called symmetrically.
|
||||
else is occurring, fire the `dataloading` event on your map when you begin
|
||||
loading and `dataload` when you are finished loading. Please note that there is
|
||||
[an issue](https://github.com/ebrelsford/Leaflet.loading/issues/26) with the
|
||||
way this control tracks these events and that this will be re-worked in a
|
||||
future version.
|
||||
|
||||
### Options
|
||||
|
||||
@@ -43,20 +47,22 @@ the `dataloading` and `dataload` are called symmetrically.
|
||||
- **separate**: (boolean) Whether the control should be separate from the zoom
|
||||
control or not, defaults to false.
|
||||
- **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.
|
||||
- **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`
|
||||
- **spin**: (object) A [spin.js][] options object. Optional, defaults to
|
||||
- **spin**: (object) A [spin.js][] options object. Optional, defaults to
|
||||
|
||||
```
|
||||
{
|
||||
{
|
||||
lines: 7,
|
||||
length: 3,
|
||||
width: 3,
|
||||
radius: 5,
|
||||
rotate: 13,
|
||||
top: "83%"
|
||||
top: "83%"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
{
|
||||
"name": "leaflet.loading",
|
||||
"version": "0.1.16",
|
||||
"version": "0.1.24",
|
||||
"homepage": "https://github.com/ebrelsford/leaflet.loading",
|
||||
"authors": [
|
||||
"Eric Brelsford <ebrelsford@gmail.com>"
|
||||
],
|
||||
"description": "A loading-indicator control for Leaflet",
|
||||
"main": "src/Control.Loading.js",
|
||||
"main": [
|
||||
"src/Control.Loading.css",
|
||||
"src/Control.Loading.js"
|
||||
],
|
||||
"keywords": [
|
||||
"leaflet",
|
||||
"map",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "leaflet-loading",
|
||||
"version": "0.1.16",
|
||||
"version": "0.1.24",
|
||||
"description": "A simple loading control for Leaflet",
|
||||
"main": "src/Control.Loading.js",
|
||||
"scripts": {
|
||||
|
||||
2
assets/leaflet/leaflet.min.css
vendored
2
assets/leaflet/leaflet.min.css
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user