leaflet-mount
Advanced tools
Comparing version 0.0.0-alpha.10 to 0.0.0-alpha.11
@@ -256,5 +256,2 @@ (function(window,document,undefined){ | ||
var fig = L.DomUtil.create("figure", figCss); | ||
this._queueOpen = true; | ||
this._loadLoadables(); | ||
if (this.options.wrapFigure) { | ||
@@ -264,4 +261,4 @@ this._figure = fig | ||
c.parentNode.insertBefore(fig, c); | ||
fig.appendChild(c); | ||
} | ||
fig.appendChild(c); | ||
this._nestGroupElement = L.DomUtil.create("figcaption", styles, fig); | ||
@@ -271,2 +268,5 @@ } else { | ||
} | ||
this._queueOpen = true; | ||
this._loadLoadables(); | ||
this.on("unload", this._unloadLoadables, this) | ||
@@ -273,0 +273,0 @@ }) |
@@ -1,1 +0,1 @@ | ||
!function(t,e,i){"use strict";function o(t){return function(e){return t===L.Mount.getType(e)}}L.Mount={},L.Mount.getType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","").toLowerCase()};var n=(L.Mount.isArray=o("array"),L.Mount.isObject=o("object"),L.Mount.isFunction=o("function"),L.Mount.isNumber=o("number"),L.Mount.isString=o("string"));L.Mount.isBoolean=o("boolean");L.Mount.Loadable={load:function(){},unload:function(){},_parent:null,_loaded:!1,_load:function(){this.isLoaded()||(this._loaded=!0,this.load())},_unload:function(){this.isLoaded()&&(this.unload(),this._loaded=!1)},isLoaded:function(){return this._loaded},hasParent:function(){return!!this._parent},getParent:function(){return this._parent||null},getMap:function(){for(var t=this.getParent();t;){if(t instanceof L.Map)return t;t=t.getParent()}return null},focusMap:function(){return this.getMap()&&this.getMap().getContainer().focus(),null}},L.Mount.Loader={_queueOpen:!1,_getLoadables:function(){return this._loadableStore=this._loadableStore||{},this._loadableStore},_addLoadable:function(t){t._load&&(this._getLoadables()[L.stamp(t)]=t,t._parent=this,this._queueOpen&&this._loadLoadable(t))},_removeLoadable:function(t){t._load&&(this._unloadLoadable(t),delete t._parent,delete this._getLoadables()[L.stamp(t)])},_loadLoadable:function(t){t._load&&this._queueOpen&&t._load()},_unloadLoadable:function(t){t._unload&&this._queueOpen&&t._unload()},_everyLoadable:function(t,e){var i,o=this._getLoadables();for(i in o)t.call(e,o[i])},_loadLoadables:function(){this._everyLoadable(this._loadLoadable,this)},_unloadLoadables:function(){this._everyLoadable(this._unloadLoadable,this)}},L.Mount.Nestable={_nestRootElement:null,getElement:function(){return this._nestRootElement}},L.Mount.Nester={_nestGroupElement:null,_nest:function(t){var e,i=this._nestGroupElement;t instanceof HTMLElement?e=t:t.getElement?e=t.getElement():n(t)&&(e=new Text(t)),e&&i.appendChild(e)},_unnest:function(t){var e,i,o=this._nestGroupElement;if(t instanceof HTMLElement)e=t;else if(t.getElement)e=t.getElement();else if(n(t))for(i in o.childNodes)o.childNodes[i]instanceof Text&&o.childNodes[i].textContent===t&&(e=o.childNodes[i]);e&&e.parentNode===o&&o.removeChild(e)},nest:function(t){return this._nest(t),this},unnest:function(t){return this._unnest(t),this}},L.Map.include({lock:function(){this.boxZoom.disable(),this.doubleClickZoom.disable(),this.dragging.disable(),this.keyboard.disable(),this.scrollWheelZoom.disable(),this.touchZoom.disable(),this._locked=!0,L.DomUtil.removeClass(this._container,"unlocked"),L.DomUtil.addClass(this._container,"locked"),this.fire("lock",{target:this})},unlock:function(){this.boxZoom.enable(),this.doubleClickZoom.enable(),this.dragging.enable(),this.keyboard.enable(),this.scrollWheelZoom.enable(),this.touchZoom.enable(),this._locked=!1,L.DomUtil.removeClass(this._container,"locked"),L.DomUtil.addClass(this._container,"unlocked"),this.fire("unlock",{target:this})},isLocked:function(){return this._locked}}),L.Map.include(L.Mount.Loader).include(L.Mount.Nester).mergeOptions({mountClassName:"leaflet-mount-map-group",figureClassName:"leaflet-mount-map-figure",wrapFigure:!0,zoomControl:!1,attributionControl:!1}).addInitHook(function(){var t=this.options.mountClassName,e=this.options.figureClassName,i=this._container,o=L.DomUtil.create("figure",e);this._queueOpen=!0,this._loadLoadables(),this.options.wrapFigure?(this._figure=o,i.parentNode&&(i.parentNode.insertBefore(o,i),o.appendChild(i)),this._nestGroupElement=L.DomUtil.create("figcaption",t,o)):this._nestGroupElement=L.DomUtil.create("div",t,i),this.on("unload",this._unloadLoadables,this)}).include({mount:function(t){return this._addLoadable(t),this.nest(t),this},unmount:function(t){return this.unnest(t),this._removeLoadable(t),this}}),L.Mount.Mountable=L.Class.extend({includes:[L.Mount.Nestable,L.Mount.Loadable],addTo:function(t){t.mount(this)},remove:function(){return this.getParent()&&this.getParent().unmount(this),this}}),L.Mount.GroupMount=L.Mount.Mountable.extend({includes:[L.Mount.Nester,L.Mount.Loader],options:{mounts:[]},initialize:function(t){L.Util.setOptions(this,t),this._createElement();for(var e in this.options.mounts)this.mount(this.options.mounts[e])},_createElement:function(){var t=L.DomUtil.create("div",null,null);this._nestRootElement=t},mount:function(t){return this._addLoadable(t),this.nest(t),this},unmount:function(t){return this._removeLoadable(t),this.unnest(t),this},_load:function(){this.isLoaded()||(this._loaded=!0,this._queueOpen=!0,this.load(),this._loadLoadables())},_unload:function(){this.isLoaded()&&(this._unloadLoadables(),this.unload(),this._queueOpen=!1,this._loaded=!1)}}),L.Mount.CustomMount=L.Mount.Mountable.extend({includes:[L.Mount.Loader],options:{element:null,loads:[]},initialize:function(t){L.Util.setOptions(this,t);var e,i=this.options.loads;this._nestRootElement=this.options.element;for(e in i)this._addLoadable(i[e])},_load:function(){this.isLoaded()||(this._loaded=!0,this._queueOpen=!0,this.load(),this._loadLoadables())},_unload:function(){this.isLoaded()&&(this._unloadLoadables(),this.unload(),this._queueOpen=!1,this._loaded=!1)}}),L.Mount.Attribution=L.Mount.Mountable.extend({options:{className:"leaflet-mount-attribution",messages:['<a href="http://leafletjs.com">Leaflet</a>'],safe:!1,delimit:" | "},initialize:function(t){L.Util.setOptions(this,t),this._nestRootElement=L.DomUtil.create("span",this.options.className)},load:function(){var t=this.getMap();t.on("layeradd layerremove",this._updateContent,this),this._updateContent()},unload:function(){var t=this.getMap();t.off("layeradd layerremove",this._updateContent,this)},_updateContent:function(){var t,e,i=this.getMap(),o=this._nestRootElement,n=this.options.messages.slice();L.DomUtil.empty(o);for(t in i._layers)i._layers[t].getAttribution&&n.push(i._layers[t].getAttribution());for(t in n){var e=L.DomUtil.create("cite","",o);t<n.length-1&&o.appendChild(new Text(this.options.delimit)),this.options.safe?e.textContent=n[t]:e.innerHTML=n[t]}}});var a="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBkPSJNMTEuMDkgNTkuMDhsLTcuMDY4IDMuNzg3IDQ2Ljk3NSAyNS4xNzQgNDYuOTc1LTI1LjE3NC03LjA2OS0zLjc4Ny0zOS45MDYgMjEuMzg1TDExLjA5MSA1OS4wOHptMC0xMy4yMTRsLTcuMDY4IDMuNzg3IDQ2Ljk3NSAyNS4xNzQgNDYuOTc1LTI1LjE3NC03LjA2OS0zLjc4Ny0zOS45MDYgMjEuMzg1LTM5LjkwNi0yMS4zODV6bTM5LjkwNi0yNi42MTVMODQuNjQyIDM3LjI4IDUwLjk5NiA1NS4zMDkgMTcuMzUgMzcuMjhsMzMuNjQ2LTE4LjAyOXptMC03LjE0NUw0LjAyMSAzNy4yOGw0Ni45NzUgMjUuMTcyTDk3Ljk3MSAzNy4yOCA1MC45OTYgMTIuMTA2eiIvPjwvc3ZnPg==";L.Mount.BaseLayerSelect=L.Mount.Mountable.extend({options:{className:"leaflet-mount-base-layer-select",icon:a},initialize:function(t){L.Util.setOptions(this,t),this._buildStore(),this._createElement()},_buildStore:function(){var t,e=this.options.layers,i=this._layerStore={};for(t in e)i[L.stamp(e[t])]={layer:e[t],title:t}},_createElement:function(){var t,e=L.DomUtil.create("label",this.options.className),i=L.DomUtil.create("img",null,e),o=L.DomUtil.create("select",null,e),n=this._layerStore,a=function(t){var e=L.DomUtil.create("option","",o);return e.value=L.stamp(t.layer),e.innerText=t.title,e};i.src=this.options.icon,i.alt="base layers";for(t in n)n[t].option=a(n[t]);this._nestRootElement=e},load:function(){var t=this._nestRootElement;L.DomEvent.disableClickPropagation(t),L.DomEvent.addListener(t,"change",this._setLayer,this),this._selectActiveLayer()},unload:function(){var t=this._nestRootElement;L.DomEvent.removeListener(t,"change",this._setLayer,this)},_getActiveLayer:function(){var t,e=this.getMap(),i=this._layerStore;for(t in i)if(e.hasLayer(i[t].layer))return i[t].layer;return null},_setLayer:function(t){var e,i=this.getMap(),o=this._layerStore;this._getActiveLayer();for(e in o)e===t.target.value?i.addLayer(o[e].layer):i.removeLayer(o[e].layer);this.focusMap()},_selectActiveLayer:function(){var t=(this.getMap(),this._layerStore),e=this._getActiveLayer(),i=e&&L.stamp(e);t[i]&&t[i].option.setAttribute("selected","")}});var s="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAyLjg2IC02NDIuNDUzKSI+PHJlY3Qgcng9IjYuMTgxIiByeT0iNi4xODEiIGhlaWdodD0iNTQuMjIzIiB3aWR0aD0iNTQuMjIzIiB5PSI2ODIuMjYiIHg9IjEyNS43NSIvPjxwYXRoIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xNjYuNzIgNjgzLjQzdi0xNS4wNTFjMC03LjY1NS02LjIwNS0xMy44Ni0xMy44Ni0xMy44Ni03LjY1NSAwLTEzLjg2IDYuMjA1LTEzLjg2IDEzLjg2djI3LjgyOSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEyLjE5NSIgZmlsbD0ibm9uZSIvPjwvZz48L3N2Zz4=",l="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAxLjY4MiAtNjM4LjQ1OSkiPjxyZWN0IHJ4PSI2LjE4MSIgcnk9IjYuMTgxIiBoZWlnaHQ9IjU0LjIyMyIgd2lkdGg9IjU0LjIyMyIgeT0iNjgwLjY2IiB4PSIxMTUuMTQiLz48cGF0aCBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTgyLjEyIDY3Ny4wM3YtMTUuMDUxYzAtNy42NTUtNi4yMDUtMTMuODYtMTMuODYtMTMuODYtNy42NTUgMC0xMy44NiA2LjIwNS0xMy44NiAxMy44NnYyNy44MjkiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIxMi4xOTUiIGZpbGw9Im5vbmUiLz48L2c+PC9zdmc+";L.Mount.Lock=L.Mount.Mountable.extend({options:{className:"leaflet-mount-map-lock",lockOnLoad:!0,unlockIcon:l,lockIcon:s},initialize:function(t){L.Util.setOptions(this,t),this._createElement()},_createElement:function(){var t=L.DomUtil.create("label",this.options.className),e=L.DomUtil.create("input",null,t),i=L.DomUtil.create("img",null,t);e.type="checkbox",i.alt="map lock",L.DomEvent.addListener(e,"click",this.toggleLock,this),this._img=i,this._checkbox=e,this._nestRootElement=t},load:function(){this.options.lockOnLoad&&this.getMap().lock(),this.getMap().on("lock unlock",this.updateCheckbox,this),this.updateCheckbox()},unload:function(){this.getMap().unlock()},updateCheckbox:function(){var t=this.getMap().isLocked(),e=this.options;this._img.src=t?e.lockIcon:e.unlockIcon,this._checkbox.checked=t},toggleLock:function(t){var e=this.getMap();e.isLocked()?e.unlock():e.lock()}}),L.Mount.Modal=L.Mount.GroupMount.extend({options:{title:"",startOpen:!0,controls:!0,className:"leaflet-mount-modal"},initialize:function(t){L.Mount.GroupMount.prototype.initialize.apply(this,arguments)},_createElement:function(){var t=L.DomUtil.create("section",this.options.className);if(this.options.controls||this.options.title){var e=L.DomUtil.create("header",null,t);if(this.options.title){var i=L.DomUtil.create("h3",null,e);i.textContent=this.options.title}if(this.options.controls){var o=L.DomUtil.create("button",null,e);L.DomEvent.addListener(o,"click",this.close,this),o.textContent="×"}}var n=L.DomUtil.create("div",null,t);this._nestRootElement=t,this._modal=t,this._nestGroupElement=n},load:function(){this.options.startOpen?this.open():this.close()},unload:function(){this.close()},open:function(){this.getMap().lock(),L.DomUtil.removeClass(this._modal,"modal-closed"),L.DomUtil.addClass(this._modal,"modal-open")},close:function(){this.getMap().unlock(),L.DomUtil.removeClass(this._modal,"modal-open"),L.DomUtil.addClass(this._modal,"modal-closed")}});var u="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBzdHlsZT0idGV4dC1kZWNvcmF0aW9uLWNvbG9yOiMwMDA7aXNvbGF0aW9uOmF1dG87bWl4LWJsZW5kLW1vZGU6bm9ybWFsO2Jsb2NrLXByb2dyZXNzaW9uOnRiO3RleHQtZGVjb3JhdGlvbi1saW5lOm5vbmU7dGV4dC1kZWNvcmF0aW9uLXN0eWxlOnNvbGlkO3RleHQtaW5kZW50OjA7dGV4dC10cmFuc2Zvcm06bm9uZSIgZD0iTTgzLjk5IDUuNDZMNDkuMjA1IDQ1Ljc3MSAyOC4xNyAzMS4yNTNsLTYuNjQ3IDkuNjI5IDI5LjY4IDIwLjQ4MiA0MS42NDUtNDguMjYyLTguODU3LTcuNjQzek00OS45OTggMjkuMjgxbC0xMC40NzcgNS42MTUgNS44MjggNC4wMiA0LjY0OS0yLjQ5IDEuODU1Ljk5NCA0LjIxNy00Ljg4NS02LjA3Mi0zLjI1NHptMjIuODY5IDEyLjI1NmwtNC4yMTUgNC44ODUgMTQuOTkyIDguMDMzLTMzLjY0NiAxOC4wMjktMzMuNjQ2LTE4LjAyOSAxMC41NjItNS42Ni01LjgyNi00LjAyMi0xOC4wNjQgOS42ODIgNDYuOTc1IDI1LjE3MiA0Ni45NzUtMjUuMTcyLTI0LjEwNS0xMi45MTh6TTEwLjA5MiA2My4wNDFsLTcuMDY4IDMuNzg3IDQ2Ljk3NSAyNS4xNzQgNDYuOTc1LTI1LjE3NC03LjA2OS0zLjc4N0w1MCA4NC40MjYgMTAuMDkzIDYzLjA0MXoiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY29sb3I9IiMwMDAiIHdoaXRlLXNwYWNlPSJub3JtYWwiLz48L3N2Zz4=",c="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBzdHlsZT0idGV4dC1kZWNvcmF0aW9uLWNvbG9yOiMwMDA7aXNvbGF0aW9uOmF1dG87bWl4LWJsZW5kLW1vZGU6bm9ybWFsO2Jsb2NrLXByb2dyZXNzaW9uOnRiO3RleHQtZGVjb3JhdGlvbi1saW5lOm5vbmU7dGV4dC1kZWNvcmF0aW9uLXN0eWxlOnNvbGlkO3RleHQtaW5kZW50OjA7dGV4dC10cmFuc2Zvcm06bm9uZSIgZD0iTTMxLjEyIDQuNjVsLTguMjczIDguMjcxIDE4LjY0IDE4LjY0MS0xOC42NCAxOC42NDEgOC4yNzMgOC4yNzIgMTguNjM5LTE4LjY0MUw2OC40IDU4LjQ3NWw4LjI3My04LjI3Mi0xOC42NC0xOC42NCAxOC42NC0xOC42NDJMNjguNCA0LjY1IDQ5Ljc1OSAyMy4yOTEgMzEuMTIgNC42NXptNDMuNzYzIDM3Ljk3MWw3LjY0NCA3LjQ1MS0yLjQyNSAyLjQ4OCAzLjU0IDEuODk5LTMzLjY0NSAxOC4wMjktMzMuNjQ2LTE4LjAzIDQuMDgyLTIuMTg3LTIuNzA3LTIuNzcgNi42MTctNi40NjhMMy4wMjMgNTQuNDZsNDYuOTc1IDI1LjE3Mkw5Ni45NzMgNTQuNDYgNzQuODg1IDQyLjYyMXpNMTAuMDkgNjMuMDQ1bC03LjA2OCAzLjc4NyA0Ni45NzUgMjUuMTc0IDQ2Ljk3NS0yNS4xNzQtNy4wNjktMy43ODdMNDkuOTk3IDg0LjQzIDEwLjA5MSA2My4wNDV6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNvbG9yPSIjMDAwIiB3aGl0ZS1zcGFjZT0ibm9ybWFsIi8+PC9zdmc+";L.Mount.OverlayToggle=L.Mount.Mountable.extend({options:{className:"leaflet-mount-overlay-toggle",layer:null,title:"layer name",attachedIcon:u,detachedIcon:c},initialize:function(t){L.Util.setOptions(this,t),this._createElement()},_createElement:function(){var t=L.DomUtil.create("label",this.options.className),e=L.DomUtil.create("input",null,t),i=L.DomUtil.create("img",null,t),o=L.DomUtil.create("span",null,t);e.type="checkbox",o.textContent=this.options.title,this._img=i,this._checkbox=e,this._nestRootElement=t},load:function(){var t=this._checkbox,e=this.options.layer;L.DomEvent.addListener(t,"click",this._toggleLayer,this),e.on("add remove",this._updateCheckbox,this),this._updateCheckbox()},unload:function(){var t=this._checkbox,e=this.options.layer;L.DomEvent.removeListener(t,"click",this._toggleLayer,this),e.off("add remove",this._updateCheckbox,this)},_updateCheckbox:function(t){var e=this.options,i=this.getMap().hasLayer(e.layer);this._checkbox.checked=i,this._img.src=i?e.attachedIcon:e.detachedIcon,this._img.alt=i?"layer attached":"layer detached"},_toggleLayer:function(t){var e=this.getMap(),i=this.options.layer;e.hasLayer(i)?e.removeLayer(i):e.addLayer(i)}}),L.Mount.TagMount=L.Mount.GroupMount.extend({options:{selector:null,tagName:"div",classes:null,id:null,config:function(){}},initialize:function(t){L.Mount.GroupMount.prototype.initialize.apply(this,arguments)},_createElement:function(){this.options.selector&&L.Util.setOptions(this,this._parseSelector(this.options.selector));var t=this.options,e=L.DomUtil.create(t.tagName,t.classes);t.id&&(e.id=t.id),t.config(e),this._nestRootElement=e,this._nestGroupElement=e},_parseSelector:function(t){var e=function(t){return t.slice(1)},i=t.match(/^[a-zA-Z]+/),o=t.match(/\.[-_a-zA-Z0-9]+/g),n=t.match(/#[-_a-zA-Z0-9]+/);return{tagName:i?i[0]:"div",id:n?e(n[0]):null,classes:o?o.map(e).join(" "):null}}});var d="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48ZyBmaWxsPSIjMWExYTFhIj48cGF0aCBkPSJNMzcuNSAwaDI1djEwMGgtMjV6Ii8+PHBhdGggZD0iTTEwMCAzNy41djI1SDB2LTI1eiIvPjwvZz48L3N2Zz4=",r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBmaWxsPSIjMWExYTFhIiBkPSJNMTAwIDM3LjV2MjVIMHYtMjV6Ii8+PC9zdmc+";L.Mount.Zoom=L.Mount.Mountable.extend({options:{tagName:"button",altText:"zoom",className:"leaflet-mount-zoom",icon:L.Util.emptyImageUrl,disableOn:function(){},nextValue:function(){}},initialize:function(t){L.Util.setOptions(this,t),this._createElement()},_createElement:function(){var t=this.options,e=L.DomUtil.create(t.tagName,t.className),i=L.DomUtil.create("img","");i.src=t.icon,i.alt=t.altText,e.appendChild(i),this._nestRootElement=e},load:function(){var t=this._nestRootElement;L.DomEvent.disableClickPropagation(t),L.DomEvent.addListener(t,"click",this._zoom,this),this.getMap().on("zoomend",this._updateButton,this)},unload:function(){var t=this._nestRootElement;L.DomEvent.disableClickPropagation(t),L.DomEvent.addListener(t,"click",this._zoom,this),this.getMap().off("zoomend",this._updateButton,this)},_updateButton:function(){var t=this.getMap(),e=t.getZoom(),i={max:t.getMaxZoom(),min:t.getMinZoom()},o=this.options.disableOn(e,i);o?this._nestRootElement.setAttribute("disabled",""):this._nestRootElement.removeAttribute("disabled")},_zoom:function(){var t=this.getMap(),e=t.getZoom(),i=this.options.nextValue(e),o=t.getMaxZoom(),n=t.getMinZoom();i>o&&(i=o),i<n&&(i=n),t.setZoom(i),this.focusMap()}}),L.Mount.ZoomIn=L.Mount.Zoom.extend({options:{icon:d,altText:"zoom in",disableOn:function(t,e){return t>=e.max},nextValue:function(t){return t+1}},initialize:function(){L.Mount.Zoom.prototype.initialize.apply(this,arguments)}}),L.Mount.ZoomOut=L.Mount.Zoom.extend({options:{icon:r,altText:"zoom out",disableOn:function(t,e){return t<=e.min},nextValue:function(t){return t-1}},initialize:function(){L.Mount.Zoom.prototype.initialize.apply(this,arguments)}})}(this,document); | ||
!function(t,e,i){"use strict";function o(t){return function(e){return t===L.Mount.getType(e)}}L.Mount={},L.Mount.getType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","").toLowerCase()};var n=(L.Mount.isArray=o("array"),L.Mount.isObject=o("object"),L.Mount.isFunction=o("function"),L.Mount.isNumber=o("number"),L.Mount.isString=o("string"));L.Mount.isBoolean=o("boolean");L.Mount.Loadable={load:function(){},unload:function(){},_parent:null,_loaded:!1,_load:function(){this.isLoaded()||(this._loaded=!0,this.load())},_unload:function(){this.isLoaded()&&(this.unload(),this._loaded=!1)},isLoaded:function(){return this._loaded},hasParent:function(){return!!this._parent},getParent:function(){return this._parent||null},getMap:function(){for(var t=this.getParent();t;){if(t instanceof L.Map)return t;t=t.getParent()}return null},focusMap:function(){return this.getMap()&&this.getMap().getContainer().focus(),null}},L.Mount.Loader={_queueOpen:!1,_getLoadables:function(){return this._loadableStore=this._loadableStore||{},this._loadableStore},_addLoadable:function(t){t._load&&(this._getLoadables()[L.stamp(t)]=t,t._parent=this,this._queueOpen&&this._loadLoadable(t))},_removeLoadable:function(t){t._load&&(this._unloadLoadable(t),delete t._parent,delete this._getLoadables()[L.stamp(t)])},_loadLoadable:function(t){t._load&&this._queueOpen&&t._load()},_unloadLoadable:function(t){t._unload&&this._queueOpen&&t._unload()},_everyLoadable:function(t,e){var i,o=this._getLoadables();for(i in o)t.call(e,o[i])},_loadLoadables:function(){this._everyLoadable(this._loadLoadable,this)},_unloadLoadables:function(){this._everyLoadable(this._unloadLoadable,this)}},L.Mount.Nestable={_nestRootElement:null,getElement:function(){return this._nestRootElement}},L.Mount.Nester={_nestGroupElement:null,_nest:function(t){var e,i=this._nestGroupElement;t instanceof HTMLElement?e=t:t.getElement?e=t.getElement():n(t)&&(e=new Text(t)),e&&i.appendChild(e)},_unnest:function(t){var e,i,o=this._nestGroupElement;if(t instanceof HTMLElement)e=t;else if(t.getElement)e=t.getElement();else if(n(t))for(i in o.childNodes)o.childNodes[i]instanceof Text&&o.childNodes[i].textContent===t&&(e=o.childNodes[i]);e&&e.parentNode===o&&o.removeChild(e)},nest:function(t){return this._nest(t),this},unnest:function(t){return this._unnest(t),this}},L.Map.include({lock:function(){this.boxZoom.disable(),this.doubleClickZoom.disable(),this.dragging.disable(),this.keyboard.disable(),this.scrollWheelZoom.disable(),this.touchZoom.disable(),this._locked=!0,L.DomUtil.removeClass(this._container,"unlocked"),L.DomUtil.addClass(this._container,"locked"),this.fire("lock",{target:this})},unlock:function(){this.boxZoom.enable(),this.doubleClickZoom.enable(),this.dragging.enable(),this.keyboard.enable(),this.scrollWheelZoom.enable(),this.touchZoom.enable(),this._locked=!1,L.DomUtil.removeClass(this._container,"locked"),L.DomUtil.addClass(this._container,"unlocked"),this.fire("unlock",{target:this})},isLocked:function(){return this._locked}}),L.Map.include(L.Mount.Loader).include(L.Mount.Nester).mergeOptions({mountClassName:"leaflet-mount-map-group",figureClassName:"leaflet-mount-map-figure",wrapFigure:!0,zoomControl:!1,attributionControl:!1}).addInitHook(function(){var t=this.options.mountClassName,e=this.options.figureClassName,i=this._container,o=L.DomUtil.create("figure",e);this.options.wrapFigure?(this._figure=o,i.parentNode&&i.parentNode.insertBefore(o,i),o.appendChild(i),this._nestGroupElement=L.DomUtil.create("figcaption",t,o)):this._nestGroupElement=L.DomUtil.create("div",t,i),this._queueOpen=!0,this._loadLoadables(),this.on("unload",this._unloadLoadables,this)}).include({mount:function(t){return this._addLoadable(t),this.nest(t),this},unmount:function(t){return this.unnest(t),this._removeLoadable(t),this}}),L.Mount.Mountable=L.Class.extend({includes:[L.Mount.Nestable,L.Mount.Loadable],addTo:function(t){t.mount(this)},remove:function(){return this.getParent()&&this.getParent().unmount(this),this}}),L.Mount.GroupMount=L.Mount.Mountable.extend({includes:[L.Mount.Nester,L.Mount.Loader],options:{mounts:[]},initialize:function(t){L.Util.setOptions(this,t),this._createElement();for(var e in this.options.mounts)this.mount(this.options.mounts[e])},_createElement:function(){var t=L.DomUtil.create("div",null,null);this._nestRootElement=t},mount:function(t){return this._addLoadable(t),this.nest(t),this},unmount:function(t){return this._removeLoadable(t),this.unnest(t),this},_load:function(){this.isLoaded()||(this._loaded=!0,this._queueOpen=!0,this.load(),this._loadLoadables())},_unload:function(){this.isLoaded()&&(this._unloadLoadables(),this.unload(),this._queueOpen=!1,this._loaded=!1)}}),L.Mount.CustomMount=L.Mount.Mountable.extend({includes:[L.Mount.Loader],options:{element:null,loads:[]},initialize:function(t){L.Util.setOptions(this,t);var e,i=this.options.loads;this._nestRootElement=this.options.element;for(e in i)this._addLoadable(i[e])},_load:function(){this.isLoaded()||(this._loaded=!0,this._queueOpen=!0,this.load(),this._loadLoadables())},_unload:function(){this.isLoaded()&&(this._unloadLoadables(),this.unload(),this._queueOpen=!1,this._loaded=!1)}}),L.Mount.Attribution=L.Mount.Mountable.extend({options:{className:"leaflet-mount-attribution",messages:['<a href="http://leafletjs.com">Leaflet</a>'],safe:!1,delimit:" | "},initialize:function(t){L.Util.setOptions(this,t),this._nestRootElement=L.DomUtil.create("span",this.options.className)},load:function(){var t=this.getMap();t.on("layeradd layerremove",this._updateContent,this),this._updateContent()},unload:function(){var t=this.getMap();t.off("layeradd layerremove",this._updateContent,this)},_updateContent:function(){var t,e,i=this.getMap(),o=this._nestRootElement,n=this.options.messages.slice();L.DomUtil.empty(o);for(t in i._layers)i._layers[t].getAttribution&&n.push(i._layers[t].getAttribution());for(t in n){var e=L.DomUtil.create("cite","",o);t<n.length-1&&o.appendChild(new Text(this.options.delimit)),this.options.safe?e.textContent=n[t]:e.innerHTML=n[t]}}});var a="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBkPSJNMTEuMDkgNTkuMDhsLTcuMDY4IDMuNzg3IDQ2Ljk3NSAyNS4xNzQgNDYuOTc1LTI1LjE3NC03LjA2OS0zLjc4Ny0zOS45MDYgMjEuMzg1TDExLjA5MSA1OS4wOHptMC0xMy4yMTRsLTcuMDY4IDMuNzg3IDQ2Ljk3NSAyNS4xNzQgNDYuOTc1LTI1LjE3NC03LjA2OS0zLjc4Ny0zOS45MDYgMjEuMzg1LTM5LjkwNi0yMS4zODV6bTM5LjkwNi0yNi42MTVMODQuNjQyIDM3LjI4IDUwLjk5NiA1NS4zMDkgMTcuMzUgMzcuMjhsMzMuNjQ2LTE4LjAyOXptMC03LjE0NUw0LjAyMSAzNy4yOGw0Ni45NzUgMjUuMTcyTDk3Ljk3MSAzNy4yOCA1MC45OTYgMTIuMTA2eiIvPjwvc3ZnPg==";L.Mount.BaseLayerSelect=L.Mount.Mountable.extend({options:{className:"leaflet-mount-base-layer-select",icon:a},initialize:function(t){L.Util.setOptions(this,t),this._buildStore(),this._createElement()},_buildStore:function(){var t,e=this.options.layers,i=this._layerStore={};for(t in e)i[L.stamp(e[t])]={layer:e[t],title:t}},_createElement:function(){var t,e=L.DomUtil.create("label",this.options.className),i=L.DomUtil.create("img",null,e),o=L.DomUtil.create("select",null,e),n=this._layerStore,a=function(t){var e=L.DomUtil.create("option","",o);return e.value=L.stamp(t.layer),e.innerText=t.title,e};i.src=this.options.icon,i.alt="base layers";for(t in n)n[t].option=a(n[t]);this._nestRootElement=e},load:function(){var t=this._nestRootElement;L.DomEvent.disableClickPropagation(t),L.DomEvent.addListener(t,"change",this._setLayer,this),this._selectActiveLayer()},unload:function(){var t=this._nestRootElement;L.DomEvent.removeListener(t,"change",this._setLayer,this)},_getActiveLayer:function(){var t,e=this.getMap(),i=this._layerStore;for(t in i)if(e.hasLayer(i[t].layer))return i[t].layer;return null},_setLayer:function(t){var e,i=this.getMap(),o=this._layerStore;this._getActiveLayer();for(e in o)e===t.target.value?i.addLayer(o[e].layer):i.removeLayer(o[e].layer);this.focusMap()},_selectActiveLayer:function(){var t=(this.getMap(),this._layerStore),e=this._getActiveLayer(),i=e&&L.stamp(e);t[i]&&t[i].option.setAttribute("selected","")}});var s="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAyLjg2IC02NDIuNDUzKSI+PHJlY3Qgcng9IjYuMTgxIiByeT0iNi4xODEiIGhlaWdodD0iNTQuMjIzIiB3aWR0aD0iNTQuMjIzIiB5PSI2ODIuMjYiIHg9IjEyNS43NSIvPjxwYXRoIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xNjYuNzIgNjgzLjQzdi0xNS4wNTFjMC03LjY1NS02LjIwNS0xMy44Ni0xMy44Ni0xMy44Ni03LjY1NSAwLTEzLjg2IDYuMjA1LTEzLjg2IDEzLjg2djI3LjgyOSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEyLjE5NSIgZmlsbD0ibm9uZSIvPjwvZz48L3N2Zz4=",l="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAxLjY4MiAtNjM4LjQ1OSkiPjxyZWN0IHJ4PSI2LjE4MSIgcnk9IjYuMTgxIiBoZWlnaHQ9IjU0LjIyMyIgd2lkdGg9IjU0LjIyMyIgeT0iNjgwLjY2IiB4PSIxMTUuMTQiLz48cGF0aCBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTgyLjEyIDY3Ny4wM3YtMTUuMDUxYzAtNy42NTUtNi4yMDUtMTMuODYtMTMuODYtMTMuODYtNy42NTUgMC0xMy44NiA2LjIwNS0xMy44NiAxMy44NnYyNy44MjkiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIxMi4xOTUiIGZpbGw9Im5vbmUiLz48L2c+PC9zdmc+";L.Mount.Lock=L.Mount.Mountable.extend({options:{className:"leaflet-mount-map-lock",lockOnLoad:!0,unlockIcon:l,lockIcon:s},initialize:function(t){L.Util.setOptions(this,t),this._createElement()},_createElement:function(){var t=L.DomUtil.create("label",this.options.className),e=L.DomUtil.create("input",null,t),i=L.DomUtil.create("img",null,t);e.type="checkbox",i.alt="map lock",L.DomEvent.addListener(e,"click",this.toggleLock,this),this._img=i,this._checkbox=e,this._nestRootElement=t},load:function(){this.options.lockOnLoad&&this.getMap().lock(),this.getMap().on("lock unlock",this.updateCheckbox,this),this.updateCheckbox()},unload:function(){this.getMap().unlock()},updateCheckbox:function(){var t=this.getMap().isLocked(),e=this.options;this._img.src=t?e.lockIcon:e.unlockIcon,this._checkbox.checked=t},toggleLock:function(t){var e=this.getMap();e.isLocked()?e.unlock():e.lock()}}),L.Mount.Modal=L.Mount.GroupMount.extend({options:{title:"",startOpen:!0,controls:!0,className:"leaflet-mount-modal"},initialize:function(t){L.Mount.GroupMount.prototype.initialize.apply(this,arguments)},_createElement:function(){var t=L.DomUtil.create("section",this.options.className);if(this.options.controls||this.options.title){var e=L.DomUtil.create("header",null,t);if(this.options.title){var i=L.DomUtil.create("h3",null,e);i.textContent=this.options.title}if(this.options.controls){var o=L.DomUtil.create("button",null,e);L.DomEvent.addListener(o,"click",this.close,this),o.textContent="×"}}var n=L.DomUtil.create("div",null,t);this._nestRootElement=t,this._modal=t,this._nestGroupElement=n},load:function(){this.options.startOpen?this.open():this.close()},unload:function(){this.close()},open:function(){this.getMap().lock(),L.DomUtil.removeClass(this._modal,"modal-closed"),L.DomUtil.addClass(this._modal,"modal-open")},close:function(){this.getMap().unlock(),L.DomUtil.removeClass(this._modal,"modal-open"),L.DomUtil.addClass(this._modal,"modal-closed")}});var u="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBzdHlsZT0idGV4dC1kZWNvcmF0aW9uLWNvbG9yOiMwMDA7aXNvbGF0aW9uOmF1dG87bWl4LWJsZW5kLW1vZGU6bm9ybWFsO2Jsb2NrLXByb2dyZXNzaW9uOnRiO3RleHQtZGVjb3JhdGlvbi1saW5lOm5vbmU7dGV4dC1kZWNvcmF0aW9uLXN0eWxlOnNvbGlkO3RleHQtaW5kZW50OjA7dGV4dC10cmFuc2Zvcm06bm9uZSIgZD0iTTgzLjk5IDUuNDZMNDkuMjA1IDQ1Ljc3MSAyOC4xNyAzMS4yNTNsLTYuNjQ3IDkuNjI5IDI5LjY4IDIwLjQ4MiA0MS42NDUtNDguMjYyLTguODU3LTcuNjQzek00OS45OTggMjkuMjgxbC0xMC40NzcgNS42MTUgNS44MjggNC4wMiA0LjY0OS0yLjQ5IDEuODU1Ljk5NCA0LjIxNy00Ljg4NS02LjA3Mi0zLjI1NHptMjIuODY5IDEyLjI1NmwtNC4yMTUgNC44ODUgMTQuOTkyIDguMDMzLTMzLjY0NiAxOC4wMjktMzMuNjQ2LTE4LjAyOSAxMC41NjItNS42Ni01LjgyNi00LjAyMi0xOC4wNjQgOS42ODIgNDYuOTc1IDI1LjE3MiA0Ni45NzUtMjUuMTcyLTI0LjEwNS0xMi45MTh6TTEwLjA5MiA2My4wNDFsLTcuMDY4IDMuNzg3IDQ2Ljk3NSAyNS4xNzQgNDYuOTc1LTI1LjE3NC03LjA2OS0zLjc4N0w1MCA4NC40MjYgMTAuMDkzIDYzLjA0MXoiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY29sb3I9IiMwMDAiIHdoaXRlLXNwYWNlPSJub3JtYWwiLz48L3N2Zz4=",c="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBzdHlsZT0idGV4dC1kZWNvcmF0aW9uLWNvbG9yOiMwMDA7aXNvbGF0aW9uOmF1dG87bWl4LWJsZW5kLW1vZGU6bm9ybWFsO2Jsb2NrLXByb2dyZXNzaW9uOnRiO3RleHQtZGVjb3JhdGlvbi1saW5lOm5vbmU7dGV4dC1kZWNvcmF0aW9uLXN0eWxlOnNvbGlkO3RleHQtaW5kZW50OjA7dGV4dC10cmFuc2Zvcm06bm9uZSIgZD0iTTMxLjEyIDQuNjVsLTguMjczIDguMjcxIDE4LjY0IDE4LjY0MS0xOC42NCAxOC42NDEgOC4yNzMgOC4yNzIgMTguNjM5LTE4LjY0MUw2OC40IDU4LjQ3NWw4LjI3My04LjI3Mi0xOC42NC0xOC42NCAxOC42NC0xOC42NDJMNjguNCA0LjY1IDQ5Ljc1OSAyMy4yOTEgMzEuMTIgNC42NXptNDMuNzYzIDM3Ljk3MWw3LjY0NCA3LjQ1MS0yLjQyNSAyLjQ4OCAzLjU0IDEuODk5LTMzLjY0NSAxOC4wMjktMzMuNjQ2LTE4LjAzIDQuMDgyLTIuMTg3LTIuNzA3LTIuNzcgNi42MTctNi40NjhMMy4wMjMgNTQuNDZsNDYuOTc1IDI1LjE3Mkw5Ni45NzMgNTQuNDYgNzQuODg1IDQyLjYyMXpNMTAuMDkgNjMuMDQ1bC03LjA2OCAzLjc4NyA0Ni45NzUgMjUuMTc0IDQ2Ljk3NS0yNS4xNzQtNy4wNjktMy43ODdMNDkuOTk3IDg0LjQzIDEwLjA5MSA2My4wNDV6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNvbG9yPSIjMDAwIiB3aGl0ZS1zcGFjZT0ibm9ybWFsIi8+PC9zdmc+";L.Mount.OverlayToggle=L.Mount.Mountable.extend({options:{className:"leaflet-mount-overlay-toggle",layer:null,title:"layer name",attachedIcon:u,detachedIcon:c},initialize:function(t){L.Util.setOptions(this,t),this._createElement()},_createElement:function(){var t=L.DomUtil.create("label",this.options.className),e=L.DomUtil.create("input",null,t),i=L.DomUtil.create("img",null,t),o=L.DomUtil.create("span",null,t);e.type="checkbox",o.textContent=this.options.title,this._img=i,this._checkbox=e,this._nestRootElement=t},load:function(){var t=this._checkbox,e=this.options.layer;L.DomEvent.addListener(t,"click",this._toggleLayer,this),e.on("add remove",this._updateCheckbox,this),this._updateCheckbox()},unload:function(){var t=this._checkbox,e=this.options.layer;L.DomEvent.removeListener(t,"click",this._toggleLayer,this),e.off("add remove",this._updateCheckbox,this)},_updateCheckbox:function(t){var e=this.options,i=this.getMap().hasLayer(e.layer);this._checkbox.checked=i,this._img.src=i?e.attachedIcon:e.detachedIcon,this._img.alt=i?"layer attached":"layer detached"},_toggleLayer:function(t){var e=this.getMap(),i=this.options.layer;e.hasLayer(i)?e.removeLayer(i):e.addLayer(i)}}),L.Mount.TagMount=L.Mount.GroupMount.extend({options:{selector:null,tagName:"div",classes:null,id:null,config:function(){}},initialize:function(t){L.Mount.GroupMount.prototype.initialize.apply(this,arguments)},_createElement:function(){this.options.selector&&L.Util.setOptions(this,this._parseSelector(this.options.selector));var t=this.options,e=L.DomUtil.create(t.tagName,t.classes);t.id&&(e.id=t.id),t.config(e),this._nestRootElement=e,this._nestGroupElement=e},_parseSelector:function(t){var e=function(t){return t.slice(1)},i=t.match(/^[a-zA-Z]+/),o=t.match(/\.[-_a-zA-Z0-9]+/g),n=t.match(/#[-_a-zA-Z0-9]+/);return{tagName:i?i[0]:"div",id:n?e(n[0]):null,classes:o?o.map(e).join(" "):null}}});var d="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48ZyBmaWxsPSIjMWExYTFhIj48cGF0aCBkPSJNMzcuNSAwaDI1djEwMGgtMjV6Ii8+PHBhdGggZD0iTTEwMCAzNy41djI1SDB2LTI1eiIvPjwvZz48L3N2Zz4=",r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTA2LjY2NiIgd2lkdGg9IjEwNi42NjYiIHZpZXdCb3g9IjAgMCA5OS45OTk5OTcgOTkuOTk5OTk3Ij48cGF0aCBmaWxsPSIjMWExYTFhIiBkPSJNMTAwIDM3LjV2MjVIMHYtMjV6Ii8+PC9zdmc+";L.Mount.Zoom=L.Mount.Mountable.extend({options:{tagName:"button",altText:"zoom",className:"leaflet-mount-zoom",icon:L.Util.emptyImageUrl,disableOn:function(){},nextValue:function(){}},initialize:function(t){L.Util.setOptions(this,t),this._createElement()},_createElement:function(){var t=this.options,e=L.DomUtil.create(t.tagName,t.className),i=L.DomUtil.create("img","");i.src=t.icon,i.alt=t.altText,e.appendChild(i),this._nestRootElement=e},load:function(){var t=this._nestRootElement;L.DomEvent.disableClickPropagation(t),L.DomEvent.addListener(t,"click",this._zoom,this),this.getMap().on("zoomend",this._updateButton,this)},unload:function(){var t=this._nestRootElement;L.DomEvent.disableClickPropagation(t),L.DomEvent.addListener(t,"click",this._zoom,this),this.getMap().off("zoomend",this._updateButton,this)},_updateButton:function(){var t=this.getMap(),e=t.getZoom(),i={max:t.getMaxZoom(),min:t.getMinZoom()},o=this.options.disableOn(e,i);o?this._nestRootElement.setAttribute("disabled",""):this._nestRootElement.removeAttribute("disabled")},_zoom:function(){var t=this.getMap(),e=t.getZoom(),i=this.options.nextValue(e),o=t.getMaxZoom(),n=t.getMinZoom();i>o&&(i=o),i<n&&(i=n),t.setZoom(i),this.focusMap()}}),L.Mount.ZoomIn=L.Mount.Zoom.extend({options:{icon:d,altText:"zoom in",disableOn:function(t,e){return t>=e.max},nextValue:function(t){return t+1}},initialize:function(){L.Mount.Zoom.prototype.initialize.apply(this,arguments)}}),L.Mount.ZoomOut=L.Mount.Zoom.extend({options:{icon:r,altText:"zoom out",disableOn:function(t,e){return t<=e.min},nextValue:function(t){return t-1}},initialize:function(){L.Mount.Zoom.prototype.initialize.apply(this,arguments)}})}(this,document); |
{ | ||
"name": "leaflet-mount", | ||
"version": "0.0.0-alpha.10", | ||
"version": "0.0.0-alpha.11", | ||
"description": "Seamlessly, flexibly insert content into leaflet maps", | ||
@@ -5,0 +5,0 @@ "main": "build/leaflet-mount.min.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48722