Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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

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