You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
13 KiB

2 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b07ca80"],{"0710":function(t,e,n){"use strict";var i=n("e269"),o=n("592d"),r={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"},s=n("cd7e"),a=n("0af5"),u=n("1e8d"),c=n("0999"),l=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),h={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},p=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.options=e,n.id=e.id,n.insertFirst=void 0===e.insertFirst||e.insertFirst,n.stopEvent=void 0===e.stopEvent||e.stopEvent,n.element=document.createElement("div"),n.element.className=void 0!==e.className?e.className:"ol-overlay-container "+s["d"],n.element.style.position="absolute",n.element.style.pointerEvents="auto";var i=e.autoPan;return i&&"object"!==typeof i&&(i={animation:e.autoPanAnimation,margin:e.autoPanMargin}),n.autoPan=i||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(h.ELEMENT,n.handleElementChanged),n.addChangeListener(h.MAP,n.handleMapChanged),n.addChangeListener(h.OFFSET,n.handleOffsetChanged),n.addChangeListener(h.POSITION,n.handlePositionChanged),n.addChangeListener(h.POSITIONING,n.handlePositioningChanged),void 0!==e.element&&n.setElement(e.element),n.setOffset(void 0!==e.offset?e.offset:[0,0]),n.setPositioning(void 0!==e.positioning?e.positioning:r.TOP_LEFT),void 0!==e.position&&n.setPosition(e.position),n}return l(e,t),e.prototype.getElement=function(){return this.get(h.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(h.MAP)||null},e.prototype.getOffset=function(){return this.get(h.OFFSET)},e.prototype.getPosition=function(){return this.get(h.POSITION)},e.prototype.getPositioning=function(){return this.get(h.POSITIONING)},e.prototype.handleElementChanged=function(){Object(c["d"])(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(Object(c["e"])(this.element),Object(u["c"])(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Object(u["a"])(t,o["a"].POSTRENDER,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(h.ELEMENT,t)},e.prototype.setMap=function(t){this.set(h.MAP,t)},e.prototype.setOffset=function(t){this.set(h.OFFSET,t)},e.prototype.setPosition=function(t){this.set(h.POSITION,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(h.POSITION)){var n=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),o=this.getRect(i,[Object(c["c"])(i),Object(c["b"])(i)]),r=t||{},s=void 0===r.margin?20:r.margin;if(!Object(a["g"])(n,o)){var u=o[0]-n[0],l=n[2]-o[2],p=o[1]-n[1],f=n[3]-o[3],d=[0,0];if(u<0?d[0]=u-s:l<0&&(d[0]=Math.abs(l)+s),p<0?d[1]=p-s:f
//# sourceMappingURL=chunk-4b07ca80.e312d17d.js.map