Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextgis/control-container

Package Overview
Dependencies
Maintainers
3
Versions
117
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.30.2 to 0.31.0

11

CHANGELOG.md

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

# [0.31.0](https://github.com/nextgis/nextgisweb_frontend/compare/v0.30.2...v0.31.0) (2020-05-13)
### Bug Fixes
* **ngw-kit:** create async adapter from parent resource ([808572b](https://github.com/nextgis/nextgisweb_frontend/commit/808572b5aff6b04783cd7e9edd078e2ea5404dd2))
## [0.30.2](https://github.com/nextgis/nextgisweb_frontend/compare/v0.30.1...v0.30.2) (2020-04-30)

@@ -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")):"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}));
!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=3)}([function(n,e){n.exports=t},function(t,n){},function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));e(4);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}()},function(t,n,e){"use strict";e.r(n);var o=e(2),i=e(1);for(var r in i)"default"!==r&&function(t){e.d(n,t,(function(){return i[t]}))}(r);n.default=o.a},function(t,n,e){}]).default}));
//# sourceMappingURL=control-container.js.map
{
"name": "@nextgis/control-container",
"version": "0.30.2",
"version": "0.31.0",
"description": "Placing control elements in the corners of the map container",

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

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

@@ -51,3 +51,3 @@ "scripts": {

},
"gitHead": "26cbba87f519267b190cf4fd6ca48a7d03723911"
"gitHead": "dbaf876d0522db329934a524ac928cb34b0d76af"
}

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