UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 2.27 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import o from"../../../../../core/Evented.js";import{watch as r,sync as s}from"../../../../../core/reactiveUtils.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{j as c}from"../../../../../chunks/vec32.js";import{create as l}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectPointToVector as a}from"../../../../../geometry/projection/projectPointToVector.js";import{isMediaElementVisibleView as p}from"./mediaElementUtils.js";let m=class extends t{grabbableForEvent(){return!0}constructor(e){super(e),this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.grabbing=!1,this.dragging=!1,this.hovering=!0,this.selected=!1,this.cursor=null,this.consumesClicks=!0,this.events=new o.EventEmitter,this.addHandles(r((()=>this.selected),(e=>this.events.emit("select-changed",{action:e?"select":"deselect"})),s))}destroy(){this._set("view",null)}intersectionDistance(e){const{view:t,layer:o,element:r}=this;if(!p(t,o,r))return null;const s=t.toMap(e,{include:{layer:o,element:r}});return s&&a(s,d,t.renderSpatialReference)?c(d,t.state.camera.eye):null}onElevationChange(){}onViewChange(){}};e([i({constructOnly:!0,nonNullable:!0})],m.prototype,"element",void 0),e([i({constructOnly:!0,nonNullable:!0})],m.prototype,"layer",void 0),e([i({constructOnly:!0,nonNullable:!0})],m.prototype,"view",void 0),e([i()],m.prototype,"interactive",void 0),e([i()],m.prototype,"selectable",void 0),e([i()],m.prototype,"grabbable",void 0),e([i()],m.prototype,"grabbing",void 0),e([i()],m.prototype,"dragging",void 0),e([i()],m.prototype,"hovering",void 0),e([i()],m.prototype,"selected",void 0),e([i()],m.prototype,"cursor",void 0),m=e([n("esri.views.3d.interactive.editingTools.media.MediaElementManipulator3D")],m);const d=l();export{m as MediaElementManipulator3D};