You cannot 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
6.7 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6398],{57487:function(e,t,n){var r=n(21510),o=n(12739),i=n(10392),a=n(81248),u=n(75469),l=n(51291),c=n(41372),s=n(95783),f=n(36104),p=n(86923),h=n(92932),y=n(69039),v=n(85528),d=n(12810);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(){return(_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=g(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=F(e)););return e}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=F(e);if(t){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k="extentchanged",T=function(e){m(n,e);var t=P(n);function n(e){var r;return O(this,n),(r=t.call(this,k)).extent=e,r}return b(n)}(r.ZP);function Z(){var e=(0,y.Ly)();return function(t,n){return e[i.Z.POINT]}}function S(e){return function(t){return(0,p.hI)([e,t])}}function j(e,t){return e[0]==t[0]?function(n){return(0,p.hI)([e,[n[0],t[1]]])}:e[1]==t[1]?function(n){return(0,p.hI)([e,[t[0],n[1]]])}:null}var C=function(e){m(n,e);var t=P(n);function n(e){var r;O(this,n);var o,a=e||{};return(r=t.call(this,a)).on,r.once,r.un,r.condition_=a.condition?a.condition:f.Bx,r.extent_=null,r.pointerHandler_=null,r.pixelTolerance_=void 0!==a.pixelTolerance?a.pixelTolerance:10,r.snappedToVertex_=!1,r.extentFeature_=null,r.vertexFeature_=null,e||(e={}),r.extentOverlay_=new c.Z({source:new s.Z({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.boxStyle?e.boxStyle:(o=(0,y.Ly)(),function(e,t){return o[i.Z.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.vertexOverlay_=new c.Z({source:new s.Z({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.pointerStyle?e.pointerStyle:Z(),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.extent&&r.setExtent(e.extent),r}return b(n,[{key:"snapToVertex_",value:function(e,t){var n=t.getCoordinateFromPixelInternal(e),r=this.getExtentInternal();if(r){var o=function(e){return[[[e[0],e[1]],[e[0],e[3]]],[[e[0],e[3]],[e[2],e[3]]],[[e[2],e[3]],[e[2],e[1]]],[[e[2],e[1]],[e[0],e[1]]]]}(r);o.sort((function(e,t){return(0,h.Bs)(n,e)-(0,h.Bs)(n,t)}));var i=o[0],a=(0,h.oL)(n,i),u=t.getPixelFromCoordinateInternal(a);if((0,h.TE)(e,u)<=this.pixelTolerance_){var l=t.getPixelFromCoordinateInternal(i[0]),c=t.getPixelFromCoordinateInternal(i[1]),s=(0,h.bI)(u,l),f=(0,h.bI)(
//# sourceMappingURL=extent-interaction.js.map