PageSourceSearch

https://oma.mustankorkea.fi/e-services/mustankorkea/assets/MediaLayerInteraction-CSnfkBPi.js

js mustankorkea.fi collected 2026-09-24 23:51:17 UTC 5,276 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./editingTools-Cibsb5v1.js","./index-CYBe2UDx.js","./index-M7HaBUb6.css","./SnappingVisualizer2D-DhOKRdRB.js","./enums-BQDXKJnw.js","./hitTestSelectUtils-Dth98JUI.js","./quantityUtils-Uxx7UZoo.js","./projectVectorToVector-DfumrqD9.js","./projectPointToVector-DXs0z_C9.js","./geodesicUtils-B8i8URrZ.js","./vec42-CL_GRCcf.js","./vec4f64-o2zAXfmz.js","./plane-B_HG-Fmt.js","./mat3f64-q3fE-ZOt.js","./mat4f64-Dk4dwAN8.js","./quatf64-aQ5IuZRd.js","./sphere-bOisnsPi.js","./elevationInfoUtils-DxIu9PbJ.js","./SnappingContext-DG8wIzIJ.js","./PointSnappingHint-DF2r791r.js","./automaticLengthMeasurementUtils-CJhyWVMj.js","./MeshTransform-DE7h3wE8.js","./quat-DytHUi4k.js","./axisAngleDegrees-B0OVo-xo.js","./meshVertexSpaceUtils-DD0yADPQ.js","./MeshLocalVertexSpace-WPixFujd.js","./memoize-DmxaQ-k8.js","./unitFormatUtils-Bgh7P542.js","./ByteSizeUnit-BsxeN7wM.js","./spatialReferenceEllipsoidUtils-CyUgs-2u.js","./geodesicLengthMeasurementUtils-BoYskkid.js","./geometryEngine-Dj5CoAdI.js","./geometryEngineBase-B0ZyeKAX.js","./_commonjsHelpers-DCkdB7M8.js","./hydrated-8wIts7g6.js","./earcut-D9gy186-.js","./triangle-DYvpqdys.js","./lineSegment-6Odz6Xm6.js","./editPlaneUtils-UxJ3A5l9.js","./ReactiveSet-BsOZdF4f.js","./defaultCIMValues-ClU-VZKU.js","./hydratedFeatures-Dk4htZkL.js","./boundedPlane-tqxgj8Cr.js","./cimSymbolUtils-CltDKkfb.js","./utils-D2qg1xuP.js","./GraphicManipulator--QCRfu-v.js","./defaults-P2TA0-Aj.js","./defaultsJSON-GKolV7NZ.js","./drapedUtils-7g2rEL_y.js","./colorUtils-DAEDG7uK.js","./drawUtils-1kWUcVrC.js"])))=>i.map(i=>d[i]);
2import{cu as m,fy as v,fz as y,v as r,fA as g,P as d,fB as h,fC as f,_ as T,B as s,C as i,F as w}from"./index-CYBe2UDx.js";const c={redo:"r",undo:"z"},_=Symbol(),p=Symbol(),u=Symbol();let n=class extends m{constructor(e){super(e),this._tool=null,this._updatingHandles=new v,this.enabled=!1,this._onPointerMove=y(async t=>{const o=await this._updatingHandles.addPromise(this._findElementAtScreenPoint(t));this.destroyed||(this.removeHandles(p),o&&o!==this.selectedElement&&(this.view.cursor="pointer",this.addHandles(r(()=>this.view.cursor=null),p)))})}initialize(){this.addHandles(g(this._updatingHandles)),this._updatingHandles.add(()=>this.enabled,e=>this._setEnabled(e),d),this._updatingHandles.add(()=>this._preferredInteractionTool,()=>this._preferredInteractionToolChanged())}get _validatedSelectedElement(){const e=this.selectedElement;if(!e)return null;const{layer:{source:t}}=this;return t?"hasElement"in t?t.hasElement(e)?e:null:t===e?e:null:null}get _preferredInteractionTool(){var e;return((e=this.options)==null?void 0:e.tool)??"transform"}get updating(){return this._updatingHandles.updating}_setEnabled(e){if(this.removeHandles(_),!e)return;const{view:t}=this;this.addHandles([t.on("immediate-click",o=>this._onClick(o),h.TOOL),t.on("pointer-move",o=>this._onPointerMove(o).catch(()=>{}),h.TOOL),t.on("key-down",o=>{var l,a;o.key===c.undo&&((l=this._tool)!=null&&l.canUndo())&&(this._tool.undo(),o.stopPropagation()),o.key===c.redo&&((a=this._tool)!=null&&a.canRedo())&&(this._tool.redo(),o.stopPropagation())}),this._updatingHandles.add(()=>this._validatedSelectedElement,o=>this._selectedElementChanged(o),d),r(()=>{t.cursor=null,this._removeTool()})],_)}async _findElementAtScreenPoint(e){const t=(await this.view.hitTest(e,{include:[this.layer]})).results[0];return(t==null?void 0:t.type)==="media"?t.element:null}async _onClick(e){await this._updatingHandles.addPromise(e.async(async()=>{const t=await this._findElementAtScreenPoint(e);this.destroyed||(t&&e.stopPropagation(),this.selectedElement=t,this.selectedElement&&(this.view.cursor=null))}))}_preferredInteractionToolChanged(){const{_tool:e}=this;e&&(this._preferredInteractionTool===e.type||this._updatingHandles.addPromise(this._recreateTool()))}async _recreateTool(){this.removeHandles(u),this._removeTool();
2const e=this._validatedSelectedElement;if(!e)return;const t=new AbortController;this.addHandles(f(t),u);const{TransformTool:o,ControlPointsTransformTool:l}=await T(()=>import("./editingTools-Cibsb5v1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]),import.meta.url);if(t.signal.aborted)return;const{view:a}=this;switch(this._preferredInteractionTool){case"transform":this._tool=new o({target:e,view:a});break;case"reshape":this._tool=new l({mediaElement:e,view:a})}this.addHandles(r(()=>{this._tool&&(a.tools.remove(this._tool),this._tool=null)}),this._tool),a.addAndActivateTool(this._tool)}_removeTool(){this._tool&&this.removeHandles(this._tool)}async _selectedElementChanged(e){e!=null&&e.georeference?await this._updatingHandles.addPromise(this._recreateTool()):this._removeTool()}};s([i()],n.prototype,"_validatedSelectedElement",null),s([i()],n.prototype,"_preferredInteractionTool",null),s([i({constructOnly:!0})],n.prototype,"view",void 0),s([i({constructOnly:!0})],n.prototype,"layer",void 0),s([i()],n.prototype,"selectedElement",void 0),s([i()],n.prototype,"enabled",void 0),s([i()],n.prototype,"options",void 0),s([i()],n.prototype,"updating",null),n=s([w("esri.views.2d.layers.support.MediaLayerInteraction")],n);export{n as MediaLayerInteraction};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.