diff --git a/assets/leaflet-loading/.gitignore b/assets/leaflet-loading/.gitignore new file mode 100644 index 0000000..0e21c53 --- /dev/null +++ b/assets/leaflet-loading/.gitignore @@ -0,0 +1,2 @@ +*.swp +.DS_Store \ No newline at end of file diff --git a/assets/leaflet-loading/CONTRIBUTING.md b/assets/leaflet-loading/CONTRIBUTING.md new file mode 100644 index 0000000..39a48e4 --- /dev/null +++ b/assets/leaflet-loading/CONTRIBUTING.md @@ -0,0 +1,20 @@ +Contributing +============ + +Your pull requests are very welcome! Please follow these guidelines: + + * Keep code compatible with the same browsers Leaflet aims to be [compatible + with](http://leafletjs.com/features.html). + * Use four spaces rather than tabs. + + +## Contributors + + * [Eric Brelsford](https://github.com/ebrelsford) + * [Nick Iaconis](https://github.com/codefox421) + * [Matthias Althaus](https://github.com/althaus) + * [Yohan Boniface](https://github.com/yohanboniface) + * [kermit-the-frog](https://github.com/kermit-the-frog) + * [kcwu](https://github.com/kcwu) + * [Robbie Trencheny](https://github.com/robbiet480) + * [David Molineus](https://github.com/dmolineus) diff --git a/assets/leaflet-loading/Control.Loading.js b/assets/leaflet-loading/Control.Loading.js index f7515fd..aefcd8e 100644 --- a/assets/leaflet-loading/Control.Loading.js +++ b/assets/leaflet-loading/Control.Loading.js @@ -5,6 +5,11 @@ (function () { + var console = window.console || { + error: function () {}, + warn: function () {} + }; + function defineLeafletLoading(L) { L.Control.Loading = L.Control.extend({ options: { diff --git a/assets/leaflet-loading/Control.Loading.min.js b/assets/leaflet-loading/Control.Loading.min.js index 921dc15..e918dce 100644 --- a/assets/leaflet-loading/Control.Loading.min.js +++ b/assets/leaflet-loading/Control.Loading.min.js @@ -1 +1 @@ -!function(){function o(o){o.Control.Loading=o.Control.extend({options:{position:"topleft",separate:!1,zoomControl:null,spinjs:!1,spin:{lines:7,length:3,width:3,radius:5,rotate:13,top:"83%"}},initialize:function(t){o.setOptions(this,t),this._dataLoaders={},null!==this.options.zoomControl&&(this.zoomControl=this.options.zoomControl)},onAdd:function(t){if(this.options.spinjs&&"function"!=typeof Spinner)return console.error("Leaflet.loading cannot load because you didn't load spin.js (http://fgnass.github.io/spin.js/), even though you set it in options.");this._addLayerListeners(t),this._addMapListeners(t),this.options.separate||this.zoomControl||(t.zoomControl?this.zoomControl=t.zoomControl:t.zoomsliderControl&&(this.zoomControl=t.zoomsliderControl));var n,i="leaflet-control-loading";return this.zoomControl&&!this.options.separate?(n=this.zoomControl._container,i+=" leaflet-bar-part-bottom leaflet-bar-part last",o.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom")):n=o.DomUtil.create("div","leaflet-control-zoom leaflet-bar"),this._indicator=o.DomUtil.create("a",i,n),this.options.spinjs&&(this._spinner=new Spinner(this.options.spin).spin(),this._indicator.appendChild(this._spinner.el)),n},onRemove:function(o){this._removeLayerListeners(o),this._removeMapListeners(o)},removeFrom:function(t){return this.zoomControl&&!this.options.separate?(this._container.removeChild(this._indicator),this._map=null,this.onRemove(t),this):o.Control.prototype.removeFrom.call(this,t)},addLoader:function(o){this._dataLoaders[o]=!0,this.updateIndicator()},removeLoader:function(o){delete this._dataLoaders[o],this.updateIndicator()},updateIndicator:function(){this.isLoading()?this._showIndicator():this._hideIndicator()},isLoading:function(){return this._countLoaders()>0},_countLoaders:function(){var o,t=0;for(o in this._dataLoaders)this._dataLoaders.hasOwnProperty(o)&&t++;return t},_showIndicator:function(){o.DomUtil.addClass(this._indicator,"is-loading"),this.options.separate||(this.zoomControl instanceof o.Control.Zoom?o.DomUtil.removeClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeof o.Control.Zoomslider&&this.zoomControl instanceof o.Control.Zoomslider&&o.DomUtil.removeClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_hideIndicator:function(){o.DomUtil.removeClass(this._indicator,"is-loading"),this.options.separate||(this.zoomControl instanceof o.Control.Zoom?o.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeof o.Control.Zoomslider&&this.zoomControl instanceof o.Control.Zoomslider&&o.DomUtil.addClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_getLastControlButton:function(){for(var o=this.zoomControl._container,t=o.children.length-1;t>0;){var n=o.children[t];if(this._indicator!==n&&0!==n.offsetWidth&&0!==n.offsetHeight)break;t--}return o.children[t]},_handleLoading:function(o){this.addLoader(this.getEventId(o))},_handleLoad:function(o){this.removeLoader(this.getEventId(o))},getEventId:function(o){return o.id?o.id:o.layer?o.layer._leaflet_id:o.target._leaflet_id},_layerAdd:function(o){if(o.layer&&o.layer.on)try{o.layer.on({loading:this._handleLoading,load:this._handleLoad},this)}catch(t){console.warn("L.Control.Loading: Tried and failed to add event handlers to layer",o.layer),console.warn("L.Control.Loading: Full details",t)}},_addLayerListeners:function(o){o.eachLayer(function(o){o.on&&o.on({loading:this._handleLoading,load:this._handleLoad},this)},this),o.on("layeradd",this._layerAdd,this)},_removeLayerListeners:function(o){o.eachLayer(function(o){o.off&&o.off({loading:this._handleLoading,load:this._handleLoad},this)},this),o.off("layeradd",this._layerAdd,this)},_addMapListeners:function(o){o.on({dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)},_removeMapListeners:function(o){o.off({dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)}}),o.Map.addInitHook(function(){this.options.loadingControl&&(this.loadingControl=new o.Control.Loading,this.addControl(this.loadingControl))}),o.Control.loading=function(t){return new o.Control.Loading(t)}}"function"==typeof define&&define.amd?define(["leaflet"],function(t){o(t)}):o(L)}(); \ No newline at end of file +!function(){function o(o){o.Control.Loading=o.Control.extend({options:{position:"topleft",separate:!1,zoomControl:null,spinjs:!1,spin:{lines:7,length:3,width:3,radius:5,rotate:13,top:"83%"}},initialize:function(t){o.setOptions(this,t),this._dataLoaders={},null!==this.options.zoomControl&&(this.zoomControl=this.options.zoomControl)},onAdd:function(n){if(this.options.spinjs&&"function"!=typeof Spinner)return t.error("Leaflet.loading cannot load because you didn't load spin.js (http://fgnass.github.io/spin.js/), even though you set it in options.");this._addLayerListeners(n),this._addMapListeners(n),this.options.separate||this.zoomControl||(n.zoomControl?this.zoomControl=n.zoomControl:n.zoomsliderControl&&(this.zoomControl=n.zoomsliderControl));var i,a="leaflet-control-loading";return this.zoomControl&&!this.options.separate?(i=this.zoomControl._container,a+=" leaflet-bar-part-bottom leaflet-bar-part last",o.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom")):i=o.DomUtil.create("div","leaflet-control-zoom leaflet-bar"),this._indicator=o.DomUtil.create("a",a,i),this.options.spinjs&&(this._spinner=new Spinner(this.options.spin).spin(),this._indicator.appendChild(this._spinner.el)),i},onRemove:function(o){this._removeLayerListeners(o),this._removeMapListeners(o)},removeFrom:function(t){return this.zoomControl&&!this.options.separate?(this._container.removeChild(this._indicator),this._map=null,this.onRemove(t),this):o.Control.prototype.removeFrom.call(this,t)},addLoader:function(o){this._dataLoaders[o]=!0,this.updateIndicator()},removeLoader:function(o){delete this._dataLoaders[o],this.updateIndicator()},updateIndicator:function(){this.isLoading()?this._showIndicator():this._hideIndicator()},isLoading:function(){return this._countLoaders()>0},_countLoaders:function(){var o,t=0;for(o in this._dataLoaders)this._dataLoaders.hasOwnProperty(o)&&t++;return t},_showIndicator:function(){o.DomUtil.addClass(this._indicator,"is-loading"),this.options.separate||(this.zoomControl instanceof o.Control.Zoom?o.DomUtil.removeClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeof o.Control.Zoomslider&&this.zoomControl instanceof o.Control.Zoomslider&&o.DomUtil.removeClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_hideIndicator:function(){o.DomUtil.removeClass(this._indicator,"is-loading"),this.options.separate||(this.zoomControl instanceof o.Control.Zoom?o.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeof o.Control.Zoomslider&&this.zoomControl instanceof o.Control.Zoomslider&&o.DomUtil.addClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_getLastControlButton:function(){for(var o=this.zoomControl._container,t=o.children.length-1;t>0;){var n=o.children[t];if(this._indicator!==n&&0!==n.offsetWidth&&0!==n.offsetHeight)break;t--}return o.children[t]},_handleLoading:function(o){this.addLoader(this.getEventId(o))},_handleLoad:function(o){this.removeLoader(this.getEventId(o))},getEventId:function(o){return o.id?o.id:o.layer?o.layer._leaflet_id:o.target._leaflet_id},_layerAdd:function(o){if(o.layer&&o.layer.on)try{o.layer.on({loading:this._handleLoading,load:this._handleLoad},this)}catch(n){t.warn("L.Control.Loading: Tried and failed to add event handlers to layer",o.layer),t.warn("L.Control.Loading: Full details",n)}},_addLayerListeners:function(o){o.eachLayer(function(o){o.on&&o.on({loading:this._handleLoading,load:this._handleLoad},this)},this),o.on("layeradd",this._layerAdd,this)},_removeLayerListeners:function(o){o.eachLayer(function(o){o.off&&o.off({loading:this._handleLoading,load:this._handleLoad},this)},this),o.off("layeradd",this._layerAdd,this)},_addMapListeners:function(o){o.on({dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)},_removeMapListeners:function(o){o.off({dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)}}),o.Map.addInitHook(function(){this.options.loadingControl&&(this.loadingControl=new o.Control.Loading,this.addControl(this.loadingControl))}),o.Control.loading=function(t){return new o.Control.Loading(t)}}var t=window.console||{error:function(){},warn:function(){}};"function"==typeof define&&define.amd?define(["leaflet"],function(t){o(t)}):o(L)}(); \ No newline at end of file diff --git a/assets/leaflet-loading/README.md b/assets/leaflet-loading/README.md index a7cbef3..aad809c 100644 --- a/assets/leaflet-loading/README.md +++ b/assets/leaflet-loading/README.md @@ -71,7 +71,7 @@ See Leaflet.loading in action (zoom or pan to make tiles load): - With the loading indicator and zoom control on the [top right][topright] of the map. - The [simplest example using spin.js](http://ebrelsford.github.io/Leaflet.loading/spinjs.html) instead of an image - - Combined with a [fullscreen control][combined] (e.g. [https://github.com/brunob/leaflet.fullscreen]). + - Combined with a [fullscreen control][combined] (e.g. [leaflet.fullscreen][]). ## License @@ -86,3 +86,4 @@ License. [separate]: http://ebrelsford.github.io/Leaflet.loading/separate.html [topright]: http://ebrelsford.github.io/Leaflet.loading/topright.html [combined]: http://ebrelsford.github.io/Leaflet.loading/combined.html + [leaflet.fullscreen]: https://github.com/brunob/leaflet.fullscreen diff --git a/assets/leaflet-loading/bower.json b/assets/leaflet-loading/bower.json index a3c6268..7000889 100644 --- a/assets/leaflet-loading/bower.json +++ b/assets/leaflet-loading/bower.json @@ -1,6 +1,6 @@ { "name": "leaflet.loading", - "version": "0.1.15", + "version": "0.1.16", "homepage": "https://github.com/ebrelsford/leaflet.loading", "authors": [ "Eric Brelsford " diff --git a/assets/leaflet-loading/package.json b/assets/leaflet-loading/package.json new file mode 100644 index 0000000..8fa6979 --- /dev/null +++ b/assets/leaflet-loading/package.json @@ -0,0 +1,27 @@ +{ + "name": "leaflet-loading", + "version": "0.1.16", + "description": "A simple loading control for Leaflet", + "main": "src/Control.Loading.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/ebrelsford/Leaflet.loading.git" + }, + "keywords": [ + "leaflet", + "map", + "maps", + "gis", + "geoweb", + "loading" + ], + "author": "Eric Brelsford (http://ebrelsford.github.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/ebrelsford/Leaflet.loading/issues" + }, + "homepage": "https://github.com/ebrelsford/Leaflet.loading" +} diff --git a/module/config/config.php b/module/config/config.php index c4e9a08..2363f36 100644 --- a/module/config/config.php +++ b/module/config/config.php @@ -55,7 +55,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-markercluster'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array ( 'name' => 'Leaflet.loading', - 'version' => '0.1.15', + 'version' => '0.1.16', 'license' => 'MIT', 'homepage' => 'https://github.com/ebrelsford/Leaflet.loading', 'css' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.min.css',