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 1.10.0 to 1.11.0

2

lib/control-container.esm-browser.js

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

/** Bundle of @nextgis/control-container; version: 1.10.0; author: NextGIS */
/** Bundle of @nextgis/control-container; version: 1.11.0; author: NextGIS */
function create(tagName, className, container) {

@@ -3,0 +3,0 @@ const el = window.document.createElement(tagName);

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

/** Bundle of @nextgis/control-container; version: 1.10.0; author: NextGIS */
/** Bundle of @nextgis/control-container; version: 1.11.0; author: NextGIS */
import * as dom from '@nextgis/dom';

@@ -3,0 +3,0 @@

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

/** Bundle of @nextgis/control-container; version: 1.10.0; author: NextGIS */
/** Bundle of @nextgis/control-container; version: 1.11.0; author: NextGIS */
var ControlContainer = (function () {

@@ -199,3 +199,3 @@ 'use strict';

element.className =
this.classPrefix + "-control-container" +
"".concat(this.classPrefix, "-control-container") +
(this.addClass ? ' ' + this.addClass : '');

@@ -217,3 +217,3 @@ var positions = [

var positionContainer = document.createElement('div');
positionContainer.className = this.classPrefix + "-ctrl-" + position;
positionContainer.className = "".concat(this.classPrefix, "-ctrl-").concat(position);
return positionContainer;

@@ -220,0 +220,0 @@ };

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

var ControlContainer=function(){"use strict";function t(t,n,o){var i=window.document.createElement(t);return null!=n&&(i.className=n),o&&o.appendChild(i),i}function n(t){if("string"==typeof t){var n=document.getElementById(t);if(!n)try{n=document.querySelector(t)}catch(t){}return n||void 0}return t}var o=function(){function o(){}return o.prototype.onAdd=function(n){if(this.map||(this.map=n),!this._container){var o=t("div","webmap-ctrl webmap-ctrl-group");this._container=o,this._createContent()}return this._container},o.prototype.onRemove=function(){this.map=void 0,this._container&&function(t){var o=n(t);if(o){var i=o.parentElement;i&&i.removeChild(o)}}(this._container)},o.prototype.zoomIn=function(){if(this.map)if(this.map.zoomIn)this.map.zoomIn();else{var t=this.map.getZoom();if(t)this.map.setZoom(t+1)}},o.prototype.zoomOut=function(){if(this.map)if(this.map.zoomOut)this.map.zoomOut();else{var t=this.map.getZoom();if(t)this.map.setZoom(t-1)}},o.prototype._createContent=function(){var n=this;if(this._container){var o=t("button","webmap-ctrl-zoom-in",this._container);o.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>';var i=t("button","webmap-ctrl-zoom-out",this._container);i.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>',this.__onZoomInBtnClick=function(){return n._onZoomInBtnClick()},o.addEventListener("click",this.__onZoomInBtnClick),this.__onZoomOutBtnClick=function(){return n._onZoomOutBtnClick()},i.addEventListener("click",this.__onZoomOutBtnClick)}},o.prototype._onZoomInBtnClick=function(){this.zoomIn()},o.prototype._onZoomOutBtnClick=function(){this.zoomOut()},o}();return 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.map=t.map,this._container=this.createContainerElement()}return t.prototype.addTo=function(t){var o=n(t);return o&&o.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 o=document.createElement("div");return o.className="openlayers-ctrl",-1!==t.indexOf("bottom")&&n.childElementCount?n.insertBefore(o,n.firstChild):n.appendChild(o),o}},t.prototype.addControl=function(t,n){var o=t.onAdd(this.map);o instanceof HTMLElement&&this.append(o,n)},t.prototype.append=function(t,n){var o=this._positionsContainers[n];if(o){if("string"==typeof t){var i=document.createElement("div");i.outerHTML=t,t=i}o.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(o){var i=t._createPositionContainer(o);t._positionsContainers[o]=i,n.appendChild(i)})),n},t.prototype._createPositionContainer=function(t){var n=document.createElement("div");return n.className=this.classPrefix+"-ctrl-"+t,n},t.controls={ZOOM:o},t}()}();
var ControlContainer=function(){"use strict";function t(t,n,o){var i=window.document.createElement(t);return null!=n&&(i.className=n),o&&o.appendChild(i),i}function n(t){if("string"==typeof t){var n=document.getElementById(t);if(!n)try{n=document.querySelector(t)}catch(o){}return n||void 0}return t}var o=function(){function o(){}return o.prototype.onAdd=function(n){if(this.map||(this.map=n),!this._container){var o=t("div","webmap-ctrl webmap-ctrl-group");this._container=o,this._createContent()}return this._container},o.prototype.onRemove=function(){this.map=void 0,this._container&&function(t){var o=n(t);if(o){var i=o.parentElement;i&&i.removeChild(o)}}(this._container)},o.prototype.zoomIn=function(){if(this.map)if(this.map.zoomIn)this.map.zoomIn();else{var t=this.map.getZoom();if(t)this.map.setZoom(t+1)}},o.prototype.zoomOut=function(){if(this.map)if(this.map.zoomOut)this.map.zoomOut();else{var t=this.map.getZoom();if(t)this.map.setZoom(t-1)}},o.prototype._createContent=function(){var n=this;if(this._container){var o=t("button","webmap-ctrl-zoom-in",this._container);o.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>';var i=t("button","webmap-ctrl-zoom-out",this._container);i.innerHTML='<span class="webmap-ctrl-icon" aria-hidden="true"></span>',this.__onZoomInBtnClick=function(){return n._onZoomInBtnClick()},o.addEventListener("click",this.__onZoomInBtnClick),this.__onZoomOutBtnClick=function(){return n._onZoomOutBtnClick()},i.addEventListener("click",this.__onZoomOutBtnClick)}},o.prototype._onZoomInBtnClick=function(){this.zoomIn()},o.prototype._onZoomOutBtnClick=function(){this.zoomOut()},o}();return 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.map=t.map,this._container=this.createContainerElement()}return t.prototype.addTo=function(t){var o=n(t);return o&&o.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 o=document.createElement("div");return o.className="openlayers-ctrl",-1!==t.indexOf("bottom")&&n.childElementCount?n.insertBefore(o,n.firstChild):n.appendChild(o),o}},t.prototype.addControl=function(t,n){var o=t.onAdd(this.map);o instanceof HTMLElement&&this.append(o,n)},t.prototype.append=function(t,n){var o=this._positionsContainers[n];if(o){if("string"==typeof t){var i=document.createElement("div");i.outerHTML=t,t=i}o.appendChild(t)}},t.prototype.createContainerElement=function(){var t=this,n=document.createElement("div");n.className="".concat(this.classPrefix,"-control-container")+(this.addClass?" "+this.addClass:"");return["top-right","top-left","bottom-right","bottom-left"].forEach((function(o){var i=t._createPositionContainer(o);t._positionsContainers[o]=i,n.appendChild(i)})),n},t.prototype._createPositionContainer=function(t){var n=document.createElement("div");return n.className="".concat(this.classPrefix,"-ctrl-").concat(t),n},t.controls={ZOOM:o},t}()}();
//# sourceMappingURL=control-container.global.prod.js.map
{
"name": "@nextgis/control-container",
"version": "1.10.0",
"version": "1.11.0",
"description": "Placing control elements in the corners of the map container",

@@ -11,5 +11,5 @@ "main": "lib/control-container.global.prod.js",

"dependencies": {
"@nextgis/dom": "^1.8.4",
"@nextgis/utils": "^1.9.4",
"@nextgis/webmap": "^1.10.0",
"@nextgis/dom": "^1.11.0",
"@nextgis/utils": "^1.11.0",
"@nextgis/webmap": "^1.11.0",
"@types/events": "^3.0.0",

@@ -19,3 +19,3 @@ "events": "^3.3.0"

"devDependencies": {
"@nextgis/build-tools": "^1.8.4"
"@nextgis/build-tools": "^1.11.0"
},

@@ -55,3 +55,3 @@ "buildOptions": {

},
"gitHead": "5ad7c3c18f0f06098b1032b3cefe66474a8832bd"
"gitHead": "bdfc366ae514294b93c19d96dce9fd77f3c4a5c2"
}

Sorry, the diff of this file is not supported yet

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