UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 551 B
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{InputHandler as t}from"../InputHandler.js";class i extends t{constructor(t){super(!0),this._onChange=t,this._value="mouse",this._x=null,this._y=null,this._id=null,this.registerIncoming("pointer-move",t=>this._update(t.data))}_update(t){const i="touch"===t.native.pointerType?"touch":"mouse",{x:s,y:e,native:{pointerId:h}}=t;i===this._value&&this._x===s&&this._y===e&&this._id===h||(this._value=i,this._x=s,this._y=e,this._id=h,this._onChange(h,i,s,e))}}export{i as LatestPointer};