Socket
Socket
Sign inDemoInstall

@nextgis/control-container

Package Overview
Dependencies
Maintainers
3
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/control-container - npm Package Compare versions

Comparing version 0.29.0 to 0.29.1

lib/control-container.css

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.29.1](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.0...v0.29.1) (2020-03-30)
### Bug Fixes
* **build:** control-container extract css ([05d96c8](https://github.com/nextgis/nextgisweb_frontend/commit/05d96c8a4f4861a666244139a5903b2deb34194b))
# [0.29.0](https://github.com/nextgis/nextgisweb_frontend/compare/v0.28.3...v0.29.0) (2020-03-22)

@@ -8,0 +19,0 @@

2

lib/control-container.js

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("@nextgis/dom"),require("!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js")):"function"==typeof define&&define.amd?define(["@nextgis/dom","!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"],n):"object"==typeof exports?exports.ControlContainer=n(require("@nextgis/dom"),require("!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js")):t.ControlContainer=n(t["@nextgis/dom"],t["!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"])}("undefined"!=typeof self?self:this,(function(t,n){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=12)}([function(n,e){n.exports=t},function(t,n,e){var o=e(2),r=e(3);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var a={insert:"head",singleton:!1},i=(o(r,a),r.locals?r.locals:{});t.exports=i},function(t,e){t.exports=n},function(t,n,e){var o=e(4),r=e(5),a=e(6),i=e(7),c=e(8),p=e(9),l=e(10),b=e(11);n=o(!1);var s=r(a),u=r(i),m=r(c),d=r(p),g=r(l),w=r(b);n.push([t.i,"/* https: //github.com/mapbox/mapbox-gl-js/blob/master/src/css/mapbox-gl.css */\n.webmap-ctrl-top-left, .webmap-ctrl-top-right, .webmap-ctrl-bottom-left, .webmap-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n}\n\n.webmap-ctrl-top-left {\n top: 0;\n left: 0;\n}\n\n.webmap-ctrl-top-right {\n top: 0;\n right: 0;\n}\n\n.webmap-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n}\n\n.webmap-ctrl-bottom-right {\n right: 0;\n bottom: 0;\n}\n\n.webmap-ctrl {\n clear: both;\n pointer-events: auto;\n /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */\n transform: translate(0, 0);\n}\n\n.webmap-ctrl-top-left .webmap-ctrl {\n margin: 10px 0 0 10px;\n float: left;\n}\n\n.webmap-ctrl-top-right .webmap-ctrl {\n margin: 10px 10px 0 0;\n float: right;\n}\n\n.webmap-ctrl-bottom-left .webmap-ctrl {\n margin: 0 0 10px 10px;\n float: left;\n}\n\n.webmap-ctrl-bottom-right .webmap-ctrl {\n margin: 0 10px 10px 0;\n float: right;\n}\n\n.webmap-ctrl-group {\n border-radius: 4px;\n background: #fff;\n}\n\n.webmap-ctrl-group:not(:empty) {\n -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);\n -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);\n box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);\n}\n\n@media (-ms-high-contrast: active) {\n .webmap-ctrl-group:not(:empty) {\n box-shadow: 0 0 0 2px ButtonText;\n }\n}\n\n.webmap-ctrl-group button {\n width: 29px;\n height: 29px;\n display: block;\n padding: 0;\n outline: none;\n border: 0;\n box-sizing: border-box;\n background-color: transparent;\n cursor: pointer;\n}\n\n.webmap-ctrl-group button+button {\n border-top: 1px solid #ddd;\n}\n\n.webmap-ctrl button .webmap-ctrl-icon {\n display: block;\n width: 100%;\n height: 100%;\n background-repeat: no-repeat;\n background-position: center center;\n}\n\n@media (-ms-high-contrast: active) {\n .webmap-ctrl-icon {\n background-color: transparent;\n }\n .webmap-ctrl-group button+button {\n border-top: 1px solid ButtonText;\n }\n}\n\n/* https://bugzilla.mozilla.org/show_bug.cgi?id=140562 */\n\n.webmap-ctrl button::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.webmap-ctrl-group button:focus {\n box-shadow: 0 0 2px 2px rgba(0, 150, 255, 1);\n}\n\n.webmap-ctrl button:disabled {\n cursor: not-allowed;\n}\n\n.webmap-ctrl button:disabled .webmap-ctrl-icon {\n opacity: 0.25;\n}\n\n.webmap-ctrl button:not(:disabled):hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.webmap-ctrl-group button:focus:focus-visible {\n box-shadow: 0 0 2px 2px rgba(0, 150, 255, 1);\n}\n\n.webmap-ctrl-group button:focus:not(:focus-visible) {\n box-shadow: none;\n}\n\n.webmap-ctrl-group button:focus:first-child {\n border-radius: 4px 4px 0 0;\n}\n\n.webmap-ctrl-group button:focus:last-child {\n border-radius: 0 0 4px 4px;\n}\n\n.webmap-ctrl-group button:focus:only-child {\n border-radius: inherit;\n}\n\n.webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon {\n background-image: url("+s+");\n}\n\n.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon {\n background-image: url("+u+");\n}\n\n@media (-ms-high-contrast: active) {\n .webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon {\n background-image: url("+s+");\n }\n .webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon {\n background-image: url("+u+");\n }\n}\n\n@media (-ms-high-contrast: black-on-white) {\n .webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon {\n background-image: url("+s+");\n }\n .webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon {\n background-image: url("+u+");\n }\n}\n\n.webmap-ctrl button.webmap-ctrl-fullscreen .webmap-ctrl-icon {\n background-image: url("+m+");\n}\n\n.webmap-ctrl button.webmap-ctrl-shrink .webmap-ctrl-icon {\n background-image: url("+d+");\n}\n\n@media (-ms-high-contrast: active) {\n .webmap-ctrl button.webmap-ctrl-fullscreen .webmap-ctrl-icon {\n background-image: url("+m+");\n }\n .webmap-ctrl button.webmap-ctrl-shrink .webmap-ctrl-icon {\n background-image: url("+d+");\n }\n}\n\n@media (-ms-high-contrast: black-on-white) {\n .webmap-ctrl button.webmap-ctrl-fullscreen .webmap-ctrl-icon {\n background-image: url("+m+");\n }\n .webmap-ctrl button.webmap-ctrl-shrink .webmap-ctrl-icon {\n background-image: url("+d+");\n }\n}\n\n.webmap-ctrl button.webmap-ctrl-compass .webmap-ctrl-icon {\n background-image: url("+g+");\n}\n\n@media (-ms-high-contrast: active) {\n .webmap-ctrl button.webmap-ctrl-compass .webmap-ctrl-icon {\n @url ctrl-compass-white url(svg/mapboxgl-ctrl-compass.svg) {\n fill: #fff;\n #south {\n fill: #999;\n }\n }\n background-image: svg-inline(ctrl-compass-white);\n }\n}\n\n@media (-ms-high-contrast: black-on-white) {\n .webmap-ctrl button.webmap-ctrl-compass .webmap-ctrl-icon {\n background-image: url("+g+");\n }\n}\n\n\n.webmap-ctrl.webmap-ctrl-attrib {\n padding: 0 5px;\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0;\n}\n\n@media screen {\n .webmap-ctrl-attrib.webmap-compact {\n min-height: 20px;\n padding: 0;\n margin: 10px;\n position: relative;\n background-color: #fff;\n border-radius: 3px 12px 12px 3px;\n }\n .webmap-ctrl-attrib.webmap-compact:hover {\n padding: 2px 24px 2px 4px;\n visibility: visible;\n margin-top: 6px;\n }\n .webmap-ctrl-top-left>.webmap-ctrl-attrib.webmap-compact:hover, .webmap-ctrl-bottom-left>.webmap-ctrl-attrib.webmap-compact:hover {\n padding: 2px 4px 2px 24px;\n border-radius: 12px 3px 3px 12px;\n }\n .webmap-ctrl-attrib.webmap-compact .webmap-ctrl-attrib-inner {\n display: none;\n }\n .webmap-ctrl-attrib.webmap-compact:hover .webmap-ctrl-attrib-inner {\n display: block;\n }\n .webmap-ctrl-attrib.webmap-compact::after {\n content: '';\n cursor: pointer;\n position: absolute;\n background-image: url("+w+");\n background-color: rgba(255, 255, 255, 0.5);\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n border-radius: 12px;\n }\n .webmap-ctrl-bottom-right>.webmap-ctrl-attrib.webmap-compact::after {\n bottom: 0;\n right: 0;\n }\n .webmap-ctrl-top-right>.webmap-ctrl-attrib.webmap-compact::after {\n top: 0;\n right: 0;\n }\n .webmap-ctrl-top-left>.webmap-ctrl-attrib.webmap-compact::after {\n top: 0;\n left: 0;\n }\n .webmap-ctrl-bottom-left>.webmap-ctrl-attrib.webmap-compact::after {\n bottom: 0;\n left: 0;\n }\n}\n\n@media screen and (-ms-high-contrast: active) {\n .webmap-ctrl-attrib.webmap-compact::after {\n background-image: url("+w+");\n }\n}\n\n@media screen and (-ms-high-contrast: black-on-white) {\n .webmap-ctrl-attrib.webmap-compact::after {\n background-image: url("+w+");\n }\n}\n\n.webmap-ctrl-attrib a {\n color: rgba(0, 0, 0, 0.75);\n text-decoration: none;\n}\n\n.webmap-ctrl-attrib a:hover {\n color: inherit;\n text-decoration: underline;\n}\n\n/* stylelint-disable-next-line selector-class-pattern */\n\n.webmap-ctrl-attrib .mapbox-improve-map {\n font-weight: bold;\n margin-left: 2px;\n}\n\n.webmap-attrib-empty {\n display: none;\n}\n\n.webmap-ctrl-scale {\n background-color: rgba(255, 255, 255, 0.75);\n font-size: 10px;\n border-width: medium 2px 2px;\n border-style: none solid solid;\n border-color: #333;\n padding: 0 5px;\n color: #333;\n box-sizing: border-box;\n}\n",""]),t.exports=n},function(t,n,e){"use strict";t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e=function(t,n){var e=t[1]||"",o=t[3];if(!o)return e;if(n&&"function"==typeof btoa){var r=(i=o,c=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),p="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(p," */")),a=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([r]).join("\n")}var i,c,p;return[e].join("\n")}(n,t);return n[2]?"@media ".concat(n[2]," {").concat(e,"}"):e})).join("")},n.i=function(t,e,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(r[i]=!0)}for(var c=0;c<t.length;c++){var p=[].concat(t[c]);o&&r[p[0]]||(e&&(p[2]?p[2]="".concat(e," and ").concat(p[2]):p[2]=e),n.push(p))}},n}},function(t,n,e){"use strict";t.exports=function(t,n){return n||(n={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),n.hash&&(t+=n.hash),/["'() \t\n]/.test(t)||n.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},function(t,n){t.exports="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjkiIHZpZXdCb3g9IjAgMCAyOSAyOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xMCAxM2MtLjc1IDAtMS41Ljc1LTEuNSAxLjVTOS4yNSAxNiAxMCAxNmg5Yy43NSAwIDEuNS0uNzUgMS41LTEuNVMxOS43NSAxMyAxOSAxM2gtOXoiLz4KPC9zdmc+"},function(t,n){t.exports="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjkiIHZpZXdCb3g9IjAgMCAyOSAyOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xNC41IDguNWMtLjc1IDAtMS41Ljc1LTEuNSAxLjV2M2gtM2MtLjc1IDAtMS41Ljc1LTEuNSAxLjVTOS4yNSAxNiAxMCAxNmgzdjNjMCAuNzUuNzUgMS41IDEuNSAxLjVTMTYgMTkuNzUgMTYgMTl2LTNoM2MuNzUgMCAxLjUtLjc1IDEuNS0xLjVTMTkuNzUgMTMgMTkgMTNoLTN2LTNjMC0uNzUtLjc1LTEuNS0xLjUtMS41eiIvPgo8L3N2Zz4K"},function(t,n){t.exports="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjkiIHZpZXdCb3g9IjAgMCAyOSAyOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0yNCAxNnY1LjVjMCAxLjc1LS43NSAyLjUtMi41IDIuNUgxNnYtMWwzLTEuNS00LTUuNSAxLTEgNS41IDQgMS41LTNoMXpNNiAxNmwxLjUgMyA1LjUtNCAxIDEtNCA1LjUgMyAxLjV2MUg3LjVDNS43NSAyNCA1IDIzLjI1IDUgMjEuNVYxNmgxem03LTExdjFsLTMgMS41IDQgNS41LTEgMS01LjUtNEw2IDEzSDVWNy41QzUgNS43NSA1Ljc1IDUgNy41IDVIMTN6bTExIDIuNWMwLTEuNzUtLjc1LTIuNS0yLjUtMi41SDE2djFsMyAxLjUtNCA1LjUgMSAxIDUuNS00IDEuNSAzaDFWNy41eiIvPgo8L3N2Zz4K"},function(t,n){t.exports="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjkiIHZpZXdCb3g9IjAgMCAyOSAyOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xOC41IDE2Yy0xLjc1IDAtMi41Ljc1LTIuNSAyLjVWMjRoMWwxLjUtMyA1LjUgNCAxLTEtNC01LjUgMy0xLjV2LTFoLTUuNXpNMTMgMTguNWMwLTEuNzUtLjc1LTIuNS0yLjUtMi41SDV2MWwzIDEuNUw0IDI0bDEgMSA1LjUtNCAxLjUgM2gxdi01LjV6bTMtOGMwIDEuNzUuNzUgMi41IDIuNSAyLjVIMjR2LTFsLTMtMS41TDI1IDVsLTEtMS01LjUgNEwxNyA1aC0xdjUuNXpNMTAuNSAxM2MxLjc1IDAgMi41LS43NSAyLjUtMi41VjVoLTFsLTEuNSAzTDUgNCA0IDVsNCA1LjVMNSAxMnYxaDUuNXoiLz4KPC9zdmc+"},function(t,n){t.exports="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjkiIHZpZXdCb3g9IjAgMCAyOSAyOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xMC41IDE0bDQtOCA0IDhoLTh6Ii8+CiAgICA8cGF0aCBpZD0ic291dGgiIGQ9Ik0xMC41IDE2bDQgOCA0LThoLTh6IiBmaWxsPSIjY2NjIi8+Cjwvc3ZnPg=="},function(t,n){t.exports="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgPHBhdGggZD0iTTQgMTBhNiA2IDAgMSAwIDEyIDAgNiA2IDAgMSAwLTEyIDBtNS0zYTEgMSAwIDEgMCAyIDAgMSAxIDAgMSAwLTIgMG0wIDNhMSAxIDAgMSAxIDIgMHYzYTEgMSAwIDEgMS0yIDAiLz4KPC9zdmc+Cg=="},function(t,n,e){"use strict";e.r(n);e(1);var o=e(0),r=function(){function t(){}return t.prototype.onAdd=function(t){if(this.webMap||(this.webMap=t),!this._container){var n=o.create("div","webmap-ctrl webmap-ctrl-group");this._container=n,this._createContent()}return this._container},t.prototype.onRemove=function(){this.webMap=void 0,this._container&&o.remove(this._container)},t.prototype._createContent=function(){var t=this;if(this._container){var n=o.create("button","webmap-ctrl-zoom-in",this._container);n.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>';var e=o.create("button","webmap-ctrl-zoom-out",this._container);e.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>',this._zoomInBtn=n,this.__onZoomInBtnClick=function(){return t._onZoomInBtnClick()},n.addEventListener("click",this.__onZoomInBtnClick),this._zoomOutBtn=e,this.__onZoomOutBtnClick=function(){return t._onZoomOutBtnClick()},e.addEventListener("click",this.__onZoomOutBtnClick)}},t.prototype._onZoomInBtnClick=function(){this.changeZoom()},t.prototype._onZoomOutBtnClick=function(){this.changeZoom(!0)},t.prototype.changeZoom=function(t){var n=this.webMap;if(n){var e=n.getZoom();if(e){var o=e+(t?-1:1);n.setZoom(o)}}},t}(),a=function(){function t(t){void 0===t&&(t={}),this.classPrefix="webmap",this._positionsContainers={"bottom-left":null,"bottom-right":null,"top-left":null,"top-right":null},this.classPrefix=t.classPrefix||this.classPrefix,this.addClass=t.addClass,this.webMap=t.webMap,this._container=this.createContainerElement()}return t.prototype.addTo=function(t){var n=o.getElement(t);return n&&n.appendChild(this._container),this},t.prototype.detach=function(){var t=this._container.parentElement;t&&t.removeChild(this._container)},t.prototype.getContainer=function(){return this._container},t.prototype.getPositionContainer=function(t){var n=this._positionsContainers[t];if(n)return n},t.prototype.newPositionContainer=function(t){var n=this.getPositionContainer(t);if(n){var e=document.createElement("div");return e.className="openlayers-ctrl",-1!==t.indexOf("bottom")&&n.childElementCount?n.insertBefore(e,n.firstChild):n.appendChild(e),e}},t.prototype.addControl=function(t,n){var e=t.onAdd(this.webMap);e instanceof HTMLElement&&this.append(e,n)},t.prototype.append=function(t,n){var e=this._positionsContainers[n];if(e){if("string"==typeof t){var o=document.createElement("div");o.outerHTML=t,t=o}e.appendChild(t)}},t.prototype.createContainerElement=function(){var t=this,n=document.createElement("div");n.className=this.classPrefix+"-control-container"+(this.addClass?" "+this.addClass:"");return["top-right","top-left","bottom-right","bottom-left"].forEach((function(e){var o=t._createPositionContainer(e);t._positionsContainers[e]=o,n.appendChild(o)})),n},t.prototype._createPositionContainer=function(t){var n=document.createElement("div");return n.className=this.classPrefix+"-ctrl-"+t,n},t.controls={ZOOM:r},t}();n.default=a}]).default}));
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("@nextgis/dom")):"function"==typeof define&&define.amd?define(["@nextgis/dom"],n):"object"==typeof exports?exports.ControlContainer=n(require("@nextgis/dom")):t.ControlContainer=n(t["@nextgis/dom"])}("undefined"!=typeof self?self:this,(function(t){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(o,i,function(n){return t[n]}.bind(null,i));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=2)}([function(n,e){n.exports=t},function(t,n,e){},function(t,n,e){"use strict";e.r(n);e(1);var o=e(0),i=function(){function t(){}return t.prototype.onAdd=function(t){if(this.webMap||(this.webMap=t),!this._container){var n=o.create("div","webmap-ctrl webmap-ctrl-group");this._container=n,this._createContent()}return this._container},t.prototype.onRemove=function(){this.webMap=void 0,this._container&&o.remove(this._container)},t.prototype._createContent=function(){var t=this;if(this._container){var n=o.create("button","webmap-ctrl-zoom-in",this._container);n.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>';var e=o.create("button","webmap-ctrl-zoom-out",this._container);e.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>',this._zoomInBtn=n,this.__onZoomInBtnClick=function(){return t._onZoomInBtnClick()},n.addEventListener("click",this.__onZoomInBtnClick),this._zoomOutBtn=e,this.__onZoomOutBtnClick=function(){return t._onZoomOutBtnClick()},e.addEventListener("click",this.__onZoomOutBtnClick)}},t.prototype._onZoomInBtnClick=function(){this.changeZoom()},t.prototype._onZoomOutBtnClick=function(){this.changeZoom(!0)},t.prototype.changeZoom=function(t){var n=this.webMap;if(n){var e=n.getZoom();if(e){var o=e+(t?-1:1);n.setZoom(o)}}},t}(),r=function(){function t(t){void 0===t&&(t={}),this.classPrefix="webmap",this._positionsContainers={"bottom-left":null,"bottom-right":null,"top-left":null,"top-right":null},this.classPrefix=t.classPrefix||this.classPrefix,this.addClass=t.addClass,this.webMap=t.webMap,this._container=this.createContainerElement()}return t.prototype.addTo=function(t){var n=o.getElement(t);return n&&n.appendChild(this._container),this},t.prototype.detach=function(){var t=this._container.parentElement;t&&t.removeChild(this._container)},t.prototype.getContainer=function(){return this._container},t.prototype.getPositionContainer=function(t){var n=this._positionsContainers[t];if(n)return n},t.prototype.newPositionContainer=function(t){var n=this.getPositionContainer(t);if(n){var e=document.createElement("div");return e.className="openlayers-ctrl",-1!==t.indexOf("bottom")&&n.childElementCount?n.insertBefore(e,n.firstChild):n.appendChild(e),e}},t.prototype.addControl=function(t,n){var e=t.onAdd(this.webMap);e instanceof HTMLElement&&this.append(e,n)},t.prototype.append=function(t,n){var e=this._positionsContainers[n];if(e){if("string"==typeof t){var o=document.createElement("div");o.outerHTML=t,t=o}e.appendChild(t)}},t.prototype.createContainerElement=function(){var t=this,n=document.createElement("div");n.className=this.classPrefix+"-control-container"+(this.addClass?" "+this.addClass:"");return["top-right","top-left","bottom-right","bottom-left"].forEach((function(e){var o=t._createPositionContainer(e);t._positionsContainers[e]=o,n.appendChild(o)})),n},t.prototype._createPositionContainer=function(t){var n=document.createElement("div");return n.className=this.classPrefix+"-ctrl-"+t,n},t.controls={ZOOM:i},t}();n.default=r}]).default}));
//# sourceMappingURL=control-container.js.map
{
"name": "@nextgis/control-container",
"version": "0.29.0",
"version": "0.29.1",
"description": "Placing control elements in the corners of the map container",

@@ -9,9 +9,12 @@ "main": "lib/control-container.js",

"dependencies": {
"@nextgis/dom": "^0.29.0",
"@nextgis/utils": "^0.29.0",
"@nextgis/webmap": "^0.29.0",
"@nextgis/dom": "^0.29.1",
"@nextgis/utils": "^0.29.1",
"@nextgis/webmap": "^0.29.1",
"events": "^3.1.0"
},
"devDependencies": {
"@nextgis/build-tools": "^0.29.0"
"@nextgis/build-tools": "^0.29.1",
"install": "^0.13.0",
"mini-css-extract-plugin": "^0.9.0",
"npm": "^6.14.4"
},

@@ -47,3 +50,3 @@ "scripts": {

},
"gitHead": "6f1416230bc088c8d0ad7e22887364889a8d2c44"
"gitHead": "a6e10427258e0b08d8f6ab29513e99e5135bb8ee"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc