Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

leaflet-side-by-side.min.js 8.4KB

1
  1. !function a(s,o,d){function l(r,e){if(!o[r]){if(!s[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(h)return h(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};s[r][0].call(i.exports,function(e){return l(s[r][1][e]||e)},i,i.exports,a,s,o,d)}return o[r].exports}for(var h="function"==typeof require&&require,e=0;e<d.length;e++)l(d[e]);return l}({1:[function(h,u,e){(function(e){var r,t,i="undefined"!=typeof window?window.L:void 0!==e?e.L:null;function n(r,e,t,n){e.split(" ").forEach(function(e){i.DomEvent.on(r,e,t,n)})}function a(r,e,t,n){e.split(" ").forEach(function(e){i.DomEvent.off(r,e,t,n)})}function s(e){return"oninput"in e?"input":"change"}function o(){r=this._map.dragging.enabled(),t=this._map.tap&&this._map.tap.enabled(),this._map.dragging.disable(),this._map.tap&&this._map.tap.disable()}function d(e){this._refocusOnMap(e),r&&this._map.dragging.enable(),t&&this._map.tap.enable()}function l(e){return"undefined"===e?[]:Array.isArray(e)?e:[e]}h("./layout.css"),h("./range.css"),i.Control.SideBySide=i.Control.extend({options:{thumbSize:42,padding:0},initialize:function(e,r,t){this.setLeftLayers(e),this.setRightLayers(r),i.setOptions(this,t)},getPosition:function(){var e=this._range.value,r=(.5-e)*(2*this.options.padding+this.options.thumbSize);return this._map.getSize().x*e+r},setPosition:function(){},includes:i.Evented.prototype||i.Mixin.Events,addTo:function(e){this.remove(),this._map=e;var r=this._container=i.DomUtil.create("div","leaflet-sbs",e._controlContainer);this._divider=i.DomUtil.create("div","leaflet-sbs-divider",r);var t=this._range=i.DomUtil.create("input","leaflet-sbs-range",r);return t.type="range",t.min=0,t.max=1,t.step="any",t.value=.5,t.style.paddingLeft=t.style.paddingRight=this.options.padding+"px",this._addEvents(),this._updateLayers(),this},remove:function(){return this._map&&(this._leftLayer&&(this._leftLayer.getContainer().style.clip=""),this._rightLayer&&(this._rightLayer.getContainer().style.clip=""),this._removeEvents(),i.DomUtil.remove(this._container),this._map=null),this},setLeftLayers:function(e){return this._leftLayers=l(e),this._updateLayers(),this},setRightLayers:function(e){return this._rightLayers=l(e),this._updateLayers(),this},_updateClip:function(){var e=this._map,r=e.containerPointToLayerPoint([0,0]),t=e.containerPointToLayerPoint(e.getSize()),n=r.x+this.getPosition(),i=this.getPosition();this._divider.style.left=i+"px",this.fire("dividermove",{x:i});var a="rect("+[r.y,n,t.y,r.x].join("px,")+"px)",s="rect("+[r.y,t.x,t.y,n].join("px,")+"px)";this._leftLayer&&(this._leftLayer.getContainer().style.clip=a),this._rightLayer&&(this._rightLayer.getContainer().style.clip=s)},_updateLayers:function(){if(!this._map)return this;var e=this._leftLayer,r=this._rightLayer;this._leftLayer=this._rightLayer=null,this._leftLayers.forEach(function(e){this._map.hasLayer(e)&&(this._leftLayer=e)},this),this._rightLayers.forEach(function(e){this._map.hasLayer(e)&&(this._rightLayer=e)},this),e!==this._leftLayer&&(e&&this.fire("leftlayerremove",{layer:e}),this._leftLayer&&this.fire("leftlayeradd",{layer:this._leftLayer})),r!==this._rightLayer&&(r&&this.fire("rightlayerremove",{layer:r}),this._rightLayer&&this.fire("rightlayeradd",{layer:this._rightLayer})),this._updateClip()},_addEvents:function(){var e=this._range,r=this._map;r&&e&&(r.on("move",this._updateClip,this),r.on("layeradd layerremove",this._updateLayers,this),n(e,s(e),this._updateClip,this),n(e,i.Browser.touch?"touchstart":"mousedown",o,this),n(e,i.Browser.touch?"touchend":"mouseup",d,this))},_removeEvents:function(){var e=this._range,r=this._map;e&&(a(e,s(e),this._updateClip,this),a(e,i.Browser.touch?"touchstart":"mousedown",o,this),a(e,i.Browser.touch?"touchend":"mouseup",d,this)),r&&(r.off("layeradd layerremove",this._updateLayers,this),r.off("move",this._updateClip,this))}}),i.control.sideBySide=function(e,r,t){return new i.Control.SideBySide(e,r,t)},u.exports=i.Control.SideBySide}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./layout.css":2,"./range.css":4}],2:[function(e,r,t){var n=".leaflet-sbs-range {\r\n position: absolute;\r\n top: 50%;\r\n width: 100%;\r\n z-index: 999;\r\n}\r\n.leaflet-sbs-divider {\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 50%;\r\n margin-left: -2px;\r\n width: 4px;\r\n background-color: #fff;\r\n pointer-events: none;\r\n z-index: 999;\r\n}\r\n";e("./node_modules/cssify")(n,void 0,"_i6aomd"),r.exports=n},{"./node_modules/cssify":3}],3:[function(e,r,t){"use strict";r.exports=function(r,e,t){var n=e||document;if(n.createStyleSheet){var i=n.createStyleSheet();return i.cssText=r,i.ownerNode}return function(e,r,t){var n=e.getElementById(r);if(n)t(n);else{var i=e.getElementsByTagName("head")[0];n=e.createElement("style"),null!=r&&(n.id=r),t(n),i.appendChild(n)}return n}(n,t,function(e){e.styleSheet?e.styleSheet.cssText=r:e.innerHTML=r})},r.exports.byUrl=function(e){if(document.createStyleSheet)return document.createStyleSheet(e).ownerNode;var r=document.getElementsByTagName("head")[0],t=document.createElement("link");return t.rel="stylesheet",t.href=e,r.appendChild(t),t}},{}],4:[function(e,r,t){var n='.leaflet-sbs-range {\r\n -webkit-appearance: none;\r\n display: inline-block!important;\r\n vertical-align: middle;\r\n height: 0;\r\n padding: 0;\r\n margin: 0;\r\n border: 0;\r\n background: rgba(0, 0, 0, 0.25);\r\n min-width: 100px;\r\n cursor: pointer;\r\n pointer-events: none;\r\n z-index: 999;\r\n}\r\n.leaflet-sbs-range::-ms-fill-upper {\r\n background: transparent;\r\n}\r\n.leaflet-sbs-range::-ms-fill-lower {\r\n background: rgba(255, 255, 255, 0.25);\r\n}\r\n/* Browser thingies */\r\n\r\n.leaflet-sbs-range::-moz-range-track {\r\n opacity: 0;\r\n}\r\n.leaflet-sbs-range::-ms-track {\r\n opacity: 0;\r\n}\r\n.leaflet-sbs-range::-ms-tooltip {\r\n display: none;\r\n}\r\n/* For whatever reason, these need to be defined\r\n * on their own so dont group them */\r\n\r\n.leaflet-sbs-range::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n padding: 0;\r\n background: #fff;\r\n height: 40px;\r\n width: 40px;\r\n border-radius: 20px;\r\n cursor: ew-resize;\r\n pointer-events: auto;\r\n border: 1px solid #ddd;\r\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAABlBMVEV9fX3///+Kct39AAAAAnRSTlP/AOW3MEoAAAA9SURBVFjD7dehDQAwDANBZ/+l2wmKoiqR7pHRcaeaCxAIBAL/g7k9JxAIBAKBQCAQCAQC14H+MhAIBE4CD3fOFvGVBzhZAAAAAElFTkSuQmCC");\r\n background-position: 50% 50%;\r\n background-repeat: no-repeat;\r\n background-size: 40px 40px;\r\n}\r\n.leaflet-sbs-range::-ms-thumb {\r\n margin: 0;\r\n padding: 0;\r\n background: #fff;\r\n height: 40px;\r\n width: 40px;\r\n border-radius: 20px;\r\n cursor: ew-resize;\r\n pointer-events: auto;\r\n border: 1px solid #ddd;\r\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAABlBMVEV9fX3///+Kct39AAAAAnRSTlP/AOW3MEoAAAA9SURBVFjD7dehDQAwDANBZ/+l2wmKoiqR7pHRcaeaCxAIBAL/g7k9JxAIBAKBQCAQCAQC14H+MhAIBE4CD3fOFvGVBzhZAAAAAElFTkSuQmCC");\r\n background-position: 50% 50%;\r\n background-repeat: no-repeat;\r\n background-size: 40px 40px;\r\n}\r\n.leaflet-sbs-range::-moz-range-thumb {\r\n padding: 0;\r\n right: 0 ;\r\n background: #fff;\r\n height: 40px;\r\n width: 40px;\r\n border-radius: 20px;\r\n cursor: ew-resize;\r\n pointer-events: auto;\r\n border: 1px solid #ddd;\r\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAABlBMVEV9fX3///+Kct39AAAAAnRSTlP/AOW3MEoAAAA9SURBVFjD7dehDQAwDANBZ/+l2wmKoiqR7pHRcaeaCxAIBAL/g7k9JxAIBAKBQCAQCAQC14H+MhAIBE4CD3fOFvGVBzhZAAAAAElFTkSuQmCC");\r\n background-position: 50% 50%;\r\n background-repeat: no-repeat;\r\n background-size: 40px 40px;\r\n}\r\n.leaflet-sbs-range:disabled::-moz-range-thumb {\r\n cursor: default;\r\n}\r\n.leaflet-sbs-range:disabled::-ms-thumb {\r\n cursor: default;\r\n}\r\n.leaflet-sbs-range:disabled::-webkit-slider-thumb {\r\n cursor: default;\r\n}\r\n.leaflet-sbs-range:disabled {\r\n cursor: default;\r\n}\r\n.leaflet-sbs-range:focus {\r\n outline: none!important;\r\n}\r\n.leaflet-sbs-range::-moz-focus-outer {\r\n border: 0;\r\n}\r\n\r\n';e("./node_modules/cssify")(n,void 0,"_1tlt668"),r.exports=n},{"./node_modules/cssify":3}]},{},[1]);