@arcgis/core 6.0.0-next.15 → 6.0.0-next.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/analysis/LineOfSightAnalysis.d.ts +49 -32
  2. package/analysis/LineOfSightAnalysisObserver.d.ts +19 -3
  3. package/analysis/LineOfSightAnalysisTarget.d.ts +19 -3
  4. package/analysis/Viewshed.d.ts +23 -3
  5. package/analysis/ViewshedAnalysis.d.ts +33 -13
  6. package/arcade/geometry/operatorsWorkerConnection.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/00d66e3fba5ab4d2aa3c.js +1 -0
  9. package/assets/esri/core/workers/chunks/{d994bcf0a65d1c07160f.js → 0320cbd825f9a4222042.js} +1 -1
  10. package/assets/esri/core/workers/chunks/14d5d219e7fe017f23f0.js +1 -0
  11. package/assets/esri/core/workers/chunks/164e74d586297946a717.js +1 -0
  12. package/assets/esri/core/workers/chunks/{1bca39e0e651426bdbb5.js → 1b1d3f6916d2cb751435.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{ed6e9d7f71bfd2691717.js → 1c77de1e79860f8d2228.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1e40a26dcce4d1dadc28.js +1 -0
  15. package/assets/esri/core/workers/chunks/237a1f68a0efbfe5b77c.js +1 -0
  16. package/assets/esri/core/workers/chunks/23c43f09c4a4749516e1.js +1 -0
  17. package/assets/esri/core/workers/chunks/{3418877328f4f0830300.js → 24dac4970526a4e0ae63.js} +1 -1
  18. package/assets/esri/core/workers/chunks/26ceb0ff8d93dbb9b84f.js +1 -0
  19. package/assets/esri/core/workers/chunks/2acf2952cef69e382a35.js +1 -0
  20. package/assets/esri/core/workers/chunks/{481589c3eddad6e026ad.js → 369780276b2755361f7d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4df6cb1bee5d0720a43e.js → 36cbd614454581aaf334.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{1e0d2715d603f48a7e0b.js → 370aad23df597db80d65.js} +1 -1
  23. package/assets/esri/core/workers/chunks/3baa4a9c52f41bfd6abb.js +1 -0
  24. package/assets/esri/core/workers/chunks/42d44c7d532df5ee70e9.js +1 -0
  25. package/assets/esri/core/workers/chunks/42e985a576d7aaeed0cf.js +1 -0
  26. package/assets/esri/core/workers/chunks/{6400446b7615b97c3521.js → 45f826554499c38968c6.js} +1 -1
  27. package/assets/esri/core/workers/chunks/48cc58890fddbcf69cef.js +1 -0
  28. package/assets/esri/core/workers/chunks/494bd434fee9032e1d02.js +1 -0
  29. package/assets/esri/core/workers/chunks/{33e4ff228a8c81b99022.js → 4abd3753cd9b80e4d937.js} +1 -1
  30. package/assets/esri/core/workers/chunks/4bbe1f28f5f16a6bef05.js +1 -0
  31. package/assets/esri/core/workers/chunks/4c389472b8cdb0c55154.js +1 -0
  32. package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +1 -0
  33. package/assets/esri/core/workers/chunks/5529831dd891382c79df.js +1 -0
  34. package/assets/esri/core/workers/chunks/576248e9ae2654569420.js +1 -0
  35. package/assets/esri/core/workers/chunks/5acb422fe3cf693d9d4f.js +1 -0
  36. package/assets/esri/core/workers/chunks/{aeaaff7a4b1a99540f52.js → 5cb26bbaa08114aec5ce.js} +1 -1
  37. package/assets/esri/core/workers/chunks/661c6324529dd17b297e.js +1 -0
  38. package/assets/esri/core/workers/chunks/68dd1fd2025c7125ead1.js +1 -0
  39. package/assets/esri/core/workers/chunks/{89e76de5ae3328d821a4.js → 69f6d5997b8ff1326e39.js} +1 -1
  40. package/assets/esri/core/workers/chunks/6a8dd8b18b0b825b0c1b.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a40b6d8b5c73e06e14d4.js → 6c255c029d67423e4dac.js} +1 -1
  42. package/assets/esri/core/workers/chunks/7446d0dfebf93e86c098.js +1 -0
  43. package/assets/esri/core/workers/chunks/{688f2dbf784e66082308.js → 74c866e0b66e61751861.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{3ffda5bf0b91700dc308.js → 78643f116677950ea29a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{916b363c342b61ba5461.js → 787c1a8bda7d745633f2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/7b5f3c79e0605c32b267.js +1 -0
  47. package/assets/esri/core/workers/chunks/7bbfe9ff352afc566367.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ac5a6603f7fa78d3e4c8.js → 7e8611cb709f105946f5.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{05cd33d41d91f8d09633.js → 7fb7493f483cd9878bfa.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{acfa03c65ba3ca6c5685.js → 8715661a838361d4211a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{601e1d020b8115497944.js → 8a485130781b49dbf608.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{0ccab50877b24f862d6e.js → 8ac2098ecdc40ad41055.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{a655ebdb4bf0660615a2.js → 8b4e9fd88c0c313416d4.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{4e544de61f07ca660236.js → 8c12269d26f5a4c753cb.js} +1 -1
  55. package/assets/esri/core/workers/chunks/91dd65cf877c8f2e01a7.js +1 -0
  56. package/assets/esri/core/workers/chunks/{46b4fb6a7fe4877b0efc.js → 94baa354e50c03b82b25.js} +2 -2
  57. package/assets/esri/core/workers/chunks/950d4578dc450467404c.js +1 -0
  58. package/assets/esri/core/workers/chunks/{68be3fb88ca61f82fb90.js → 95dbbddac6581b9d671f.js} +1 -1
  59. package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +1 -0
  60. package/assets/esri/core/workers/chunks/9b051745d24d1f43480b.js +1 -0
  61. package/assets/esri/core/workers/chunks/9d61740ef8bdcc162be1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{eb04e1717a1002cda3ab.js → 9f06ec95bdf0d0b52b41.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{fafb92ca2c5e4b0b2c23.js → a09d2e1e2540921e4717.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{3b3e519f15ed52c83f0c.js → a49fe94933b65b4b64f8.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{1819c45655c836b9a8d7.js → a4d3944700f1cc240176.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{90bdf86f553e2742d67c.js → a7bd5ba4d7d97411fd33.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{900181f68449d8f82eeb.js → aa1ac7954e4f0fefe15b.js} +1 -1
  68. package/assets/esri/core/workers/chunks/ac24b4370dc7194a3107.js +1 -0
  69. package/assets/esri/core/workers/chunks/{b8337492e2b753aefac4.js → ace41659a5ca0e5abfc3.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{3c0ed15b544df6fb0903.js → b48952e1fb4cb7360dd0.js} +1 -1
  71. package/assets/esri/core/workers/chunks/b5e7475cc5fbf31289d3.js +1 -0
  72. package/assets/esri/core/workers/chunks/{f3da30d7300b92bd8bb0.js → befa32b9e7b3fbdd431e.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{0f617980c7dd9ad0444f.js → bf35927979fc5e7e0478.js} +1 -1
  74. package/assets/esri/core/workers/chunks/c4ddac23bd649d24f3f2.js +1 -0
  75. package/assets/esri/core/workers/chunks/{4e6f40cbdb8c508e6df1.js → c5a9e77977e867a75ff2.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{25f19fc929f25ddd628c.js → c79934cd6883307203f8.js} +1 -1
  77. package/assets/esri/core/workers/chunks/cddc3e285f763ccf33c2.js +1 -0
  78. package/assets/esri/core/workers/chunks/d08ff41e2a9bcd58b64a.js +1 -0
  79. package/assets/esri/core/workers/chunks/d311ff96a5a2791d8cfc.js +1 -0
  80. package/assets/esri/core/workers/chunks/d62afb71f4ece4283994.js +1 -0
  81. package/assets/esri/core/workers/chunks/dc1761cba0454fda3cf9.js +1 -0
  82. package/assets/esri/core/workers/chunks/{4ac1d3e49e242e373a92.js → e0650b1408197d3ac862.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{3ff6d1ed3c0f1285f3e7.js → e0d9dc97985561320bd4.js} +1 -1
  84. package/assets/esri/core/workers/chunks/eaddffcc7004101fc230.js +1 -0
  85. package/assets/esri/core/workers/chunks/eb2652ec48faa78de3c5.js +1 -0
  86. package/assets/esri/core/workers/chunks/eca44e53bcee9b08d70a.js +1 -0
  87. package/assets/esri/core/workers/chunks/f00458654c7c34c369ef.js +1 -0
  88. package/assets/esri/core/workers/chunks/f3cd610084e3f4d8656b.js +1 -0
  89. package/assets/esri/core/workers/chunks/f47fe4433b05fca5c3ad.js +1 -0
  90. package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +1 -0
  91. package/assets/esri/core/workers/chunks/f91bc1cb1014e05be763.js +1 -0
  92. package/assets/esri/core/workers/chunks/{ae31fd416bbb41a81392.js → f9c5aa0bbf23e780fecc.js} +1 -1
  93. package/assets/esri/core/workers/chunks/f9ff27cfcf0538ac5e26.js +1 -0
  94. package/assets/esri/core/workers/chunks/{19676b2c5f8b0a5ee680.js → facd1ff23203fed67686.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{40a584cb952e94326e9e.js → fcb86d24fc7e0666b564.js} +1 -1
  96. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  97. package/chunks/Envelope.js +1 -1
  98. package/chunks/MultiPathImpl.js +1 -1
  99. package/chunks/OperatorGeodeticArea.js +1 -1
  100. package/chunks/OperatorShapePreservingLength.js +1 -1
  101. package/chunks/OperatorShapePreservingProject.js +1 -1
  102. package/chunks/UnitFactory.js +1 -1
  103. package/chunks/basis_encoder.js +1 -1
  104. package/chunks/basis_transcoder.js +1 -1
  105. package/chunks/index.js +1 -1
  106. package/chunks/lclayout.js +1 -1
  107. package/config.d.ts +2 -0
  108. package/config.js +1 -1
  109. package/core/accessorSupport/DefaultsStore.js +1 -1
  110. package/core/accessorSupport/MultiOriginStore.js +1 -1
  111. package/core/accessorSupport/Store.js +1 -1
  112. package/core/accessorSupport/decorators/reader.js +1 -1
  113. package/core/accessorSupport/decorators/writer.js +1 -1
  114. package/core/workers/WorkerOwner.js +1 -1
  115. package/core/workers/workerFactory.js +1 -1
  116. package/core/workers/workers.js +2 -2
  117. package/core/workers.d.ts +9 -0
  118. package/form/elements/inputs/DynamicChoiceInput.d.ts +4 -2
  119. package/geometry/Mesh.js +1 -1
  120. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  121. package/geometry/operators/gx/operatorOffset.js +1 -1
  122. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  123. package/geometry/operators/support/jsonConverter.js +1 -1
  124. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  125. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  126. package/geometry/support/meshUtils/merge.js +1 -1
  127. package/geometry/support/meshUtils/rotate.js +1 -1
  128. package/geometry/support/polygonExtentClipping.js +1 -1
  129. package/identity/Credential.js +1 -1
  130. package/kernel.js +1 -1
  131. package/layers/AnnotationFeatureLayer.d.ts +2 -2
  132. package/layers/AnnotationFeatureLayer.js +1 -1
  133. package/layers/CatalogLayer.d.ts +2 -2
  134. package/layers/CatalogLayer.js +1 -1
  135. package/layers/DimensionFeatureLayer.d.ts +2 -2
  136. package/layers/DimensionFeatureLayer.js +1 -1
  137. package/layers/FeatureLayer.d.ts +4 -4
  138. package/layers/FeatureLayer.js +1 -1
  139. package/layers/ImageryTileLayer.js +1 -1
  140. package/layers/LineOfSightLayer.d.ts +10 -8
  141. package/layers/SceneLayer.js +1 -1
  142. package/layers/SubtypeGroupLayer.d.ts +2 -2
  143. package/layers/SubtypeGroupLayer.js +1 -1
  144. package/layers/ViewshedLayer.d.ts +1 -1
  145. package/layers/VoxelLayer.js +1 -1
  146. package/layers/WMSLayer.js +1 -1
  147. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  148. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +9 -9
  149. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  150. package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
  151. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  152. package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
  153. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  154. package/layers/graphics/data/QueryEngineResult.js +1 -1
  155. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  156. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  157. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  158. package/layers/mixins/{FeatureLayerReload.d.ts → ReloadableLayer.d.ts} +5 -3
  159. package/layers/mixins/ReloadableLayer.js +2 -0
  160. package/layers/raster/datasets/BaseRaster.js +1 -1
  161. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  162. package/layers/raster/datasets/ImageAuxRaster.js +2 -2
  163. package/layers/raster/datasets/ImageServerRaster.js +1 -1
  164. package/layers/raster/datasets/InMemoryRaster.js +1 -1
  165. package/layers/raster/datasets/MRFRaster.js +1 -1
  166. package/layers/raster/datasets/TIFFRaster.js +1 -1
  167. package/layers/raster/datasets/WCSRaster.js +1 -1
  168. package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
  169. package/layers/raster/formats/RasterCodec.js +1 -1
  170. package/layers/raster/formats/TiffDecoder.js +1 -1
  171. package/layers/raster/formats/Zlib.js +1 -1
  172. package/layers/raster/functions/stretchUtils.js +1 -1
  173. package/layers/raster/functions/vectorFieldUtils.js +1 -1
  174. package/layers/support/FieldsIndex.js +1 -1
  175. package/layers/support/RasterWorker.js +1 -1
  176. package/layers/support/featureReductionProperties.js +1 -1
  177. package/layers/support/kmlUtils.js +1 -1
  178. package/layers/video/VideoController.js +10 -10
  179. package/libs/maquette/projection.js +1 -1
  180. package/networks/UtilityNetworkTraceAnalysis.js +1 -1
  181. package/package.json +5 -5
  182. package/popup/FeatureModel.js +1 -1
  183. package/popup/FeaturesModel.js +1 -1
  184. package/portal/Portal.js +1 -1
  185. package/request/process.js +1 -1
  186. package/request/types.d.ts +7 -0
  187. package/rest/knowledgeGraphService.js +1 -1
  188. package/rest/networks/trace.js +1 -1
  189. package/rest/query/executeQuery.js +1 -1
  190. package/smartMapping/raster/renderers/shadedRelief.js +1 -1
  191. package/smartMapping/renderers/univariateColorSize.js +1 -1
  192. package/smartMapping/statistics/support/statsWorker.js +1 -1
  193. package/smartMapping/statistics/support/utils.js +1 -1
  194. package/smartMapping/support/clusterUtils.js +1 -1
  195. package/statistics/utils.js +1 -1
  196. package/symbols/cim/CIMCursor.js +1 -1
  197. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  198. package/symbols/cim/cimAnalyzer.js +1 -1
  199. package/symbols/support/ElevationInfo.d.ts +4 -3
  200. package/undoredo/support/Services.js +1 -1
  201. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +2 -2
  202. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  203. package/views/2d/grid/GridView2D.js +1 -1
  204. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  205. package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +1 -1
  206. package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
  207. package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +1 -1
  208. package/views/2d/viewpointUtils.js +1 -1
  209. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  210. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  211. package/views/3d/analysis/LineOfSight/types.d.ts +14 -3
  212. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +39 -13
  213. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  214. package/views/3d/analysis/Viewshed/types.d.ts +7 -0
  215. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +43 -15
  216. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  217. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  218. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  219. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  220. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  221. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  222. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  223. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  225. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  226. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  227. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  228. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  229. package/views/3d/layers/graphics/SpatialIndex2D.js +1 -1
  230. package/views/3d/layers/i3s/I3SNode.js +1 -1
  231. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  232. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  233. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  234. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  235. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  236. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  237. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  238. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  239. package/views/3d/support/elevationUpdateExtentUtils.js +1 -1
  240. package/views/3d/support/elevationUpdateUtils.js +1 -1
  241. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  242. package/views/3d/support/sphereExtentUtils.js +2 -0
  243. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  244. package/views/3d/terrain/OverlayRenderer.js +1 -1
  245. package/views/3d/terrain/PatchRenderData.js +1 -1
  246. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  247. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  248. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  249. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  250. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  251. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  252. package/views/SceneView.js +1 -1
  253. package/views/ToolViewManager.js +1 -1
  254. package/views/draw/DrawOperation.js +1 -1
  255. package/views/draw/support/InteractiveHandle.js +1 -1
  256. package/views/draw/support/Reshape.js +1 -1
  257. package/views/draw/support/createUtils.js +1 -1
  258. package/views/draw/support/editingSessionUtils.js +1 -1
  259. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  260. package/views/interactive/SegmentLabels.js +1 -1
  261. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  262. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  263. package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
  264. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  265. package/views/interactive/options/TooltipOptions.d.ts +2 -0
  266. package/views/interactive/sketch/SketchTooltipOptions.d.ts +2 -0
  267. package/views/interactive/sketch/constraintUtils.js +1 -1
  268. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  269. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  270. package/views/layers/LayerView.js +1 -1
  271. package/views/layers/LineOfSightLayerView.d.ts +35 -13
  272. package/views/layers/SketchLayerView.d.ts +1 -0
  273. package/views/layers/ViewshedLayerView.d.ts +36 -12
  274. package/views/webgl/Program.js +1 -1
  275. package/views/webgl/Texture.js +1 -1
  276. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  277. package/widgets/Directions.js +1 -1
  278. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  279. package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +1 -1
  280. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  281. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  282. package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
  283. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  284. package/widgets/Print.js +1 -1
  285. package/widgets/Slice.js +1 -1
  286. package/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js +1 -1
  287. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  288. package/widgets/support/SelectionList.js +1 -1
  289. package/widgets/support/componentsUtils.js +1 -1
  290. package/assets/esri/core/workers/chunks/024b44c0c8876627f904.js +0 -1
  291. package/assets/esri/core/workers/chunks/02c5d027bdaee67869cf.js +0 -1
  292. package/assets/esri/core/workers/chunks/03261b9451e293a0fac8.js +0 -1
  293. package/assets/esri/core/workers/chunks/0c8c01097847617261b9.js +0 -1
  294. package/assets/esri/core/workers/chunks/0d931c7579b6409a696d.js +0 -1
  295. package/assets/esri/core/workers/chunks/12c154342fff876f2f1e.js +0 -1
  296. package/assets/esri/core/workers/chunks/1e11d2e97d17685b878a.js +0 -1
  297. package/assets/esri/core/workers/chunks/1f339247b68b061ab0a4.js +0 -1
  298. package/assets/esri/core/workers/chunks/21ddb26526bcb2b122c3.js +0 -1
  299. package/assets/esri/core/workers/chunks/2eae542fe7f0f6576ac1.js +0 -1
  300. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +0 -1
  301. package/assets/esri/core/workers/chunks/46a7da93a63663878583.js +0 -1
  302. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +0 -1
  303. package/assets/esri/core/workers/chunks/4c4117e28ea358a32088.js +0 -1
  304. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +0 -1
  305. package/assets/esri/core/workers/chunks/59b216b60464611742d4.js +0 -1
  306. package/assets/esri/core/workers/chunks/62ac588f7dd1d24d0c9d.js +0 -1
  307. package/assets/esri/core/workers/chunks/62c8c9ad09e0166207fd.js +0 -1
  308. package/assets/esri/core/workers/chunks/62d6e101e9bd9557a410.js +0 -1
  309. package/assets/esri/core/workers/chunks/6558488ea96620439f34.js +0 -1
  310. package/assets/esri/core/workers/chunks/665e31c494d2af505acc.js +0 -1
  311. package/assets/esri/core/workers/chunks/6f4e6022a52de0c54aab.js +0 -1
  312. package/assets/esri/core/workers/chunks/7267b17de212207142c9.js +0 -1
  313. package/assets/esri/core/workers/chunks/7ef182e24cad50815b4e.js +0 -1
  314. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +0 -1
  315. package/assets/esri/core/workers/chunks/8431ca60ad33d594e323.js +0 -1
  316. package/assets/esri/core/workers/chunks/876f7633c15f1e31078d.js +0 -1
  317. package/assets/esri/core/workers/chunks/8ca9648eacb894283513.js +0 -1
  318. package/assets/esri/core/workers/chunks/91ebb2ccab1889eb7e81.js +0 -1
  319. package/assets/esri/core/workers/chunks/94e427040edb469d58ad.js +0 -1
  320. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +0 -1
  321. package/assets/esri/core/workers/chunks/9e1a3b6a08c96dcefdde.js +0 -1
  322. package/assets/esri/core/workers/chunks/9e3e442a9874ed23a043.js +0 -1
  323. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +0 -1
  324. package/assets/esri/core/workers/chunks/aff32980d91dab07dfb7.js +0 -1
  325. package/assets/esri/core/workers/chunks/bbf993dba74850bbf9d7.js +0 -1
  326. package/assets/esri/core/workers/chunks/d8f1cefcad02d7353d4b.js +0 -1
  327. package/assets/esri/core/workers/chunks/d938987344bce83cc660.js +0 -1
  328. package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +0 -1
  329. package/assets/esri/core/workers/chunks/de02f60258e6985ef676.js +0 -1
  330. package/assets/esri/core/workers/chunks/e10b57aefcc89671116e.js +0 -1
  331. package/assets/esri/core/workers/chunks/e65dfa19f030ec298437.js +0 -1
  332. package/assets/esri/core/workers/chunks/ed8786fed345718ed684.js +0 -1
  333. package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +0 -1
  334. package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +0 -1
  335. package/assets/esri/core/workers/chunks/fd9663952d5a94f3a83f.js +0 -1
  336. package/assets/esri/core/workers/chunks/fe9879ecd69ac4329291.js +0 -1
  337. package/layers/mixins/FeatureLayerReload.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{updatePointsFromFeatureReference as t,getFeatureId as n}from"../../../../analysis/featureReferenceUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{EventedAccessor as i}from"../../../../core/Evented.js";import a from"../../../../core/Handles.js";import{handlesGroup as o,makeHandle as s}from"../../../../core/handleUtils.js";import c from"../../../../core/Logger.js";import{abortMaybe as l}from"../../../../core/maybe.js";import{ignoreAbortErrors as u}from"../../../../core/promiseUtils.js";import{initial as d,on as f}from"../../../../core/reactiveUtils.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{copy as h,subtract as g,normalize as _,scale as v,add as y,dist as b,sub as x}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as S}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as C}from"../../../../core/support/UpdatingHandles.js";import w from"../../../../geometry/Point.js";import{projectOrLoad as T}from"../../../../geometry/projectionUtils.js";import{projectBoundingRect as E}from"../../../../geometry/projection/projectBoundingRect.js";import{intersectsSegment as D}from"../../../../geometry/support/aaBoundingBox.js";import{empty as O,containsPointObject as k,intersectsSegment as A}from"../../../../geometry/support/aaBoundingRect.js";import{create as j,fromPoints as M}from"../../../../geometry/support/ray.js";import{zValueInAbsoluteHeightMode as N}from"../../../../support/elevationInfoUtils.js";import P from"../LineOfSightAnalysisResult.js";import{LineOfSightComputation as F}from"./LineOfSightComputation.js";import{LineOfSightRayIntersector as I}from"./LineOfSightRayIntersector.js";import{logFailedGeometryProjectionError as L}from"../support/projectionUtils.js";import{toGraphic as R}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{ImmediateTask as z,TaskPriority as B}from"../../../support/Scheduler.js";let V=class extends i{constructor(e){super(e),this.updateOnCameraChange=!0,this._observerGroundOffsetRenderSpace=0,this._effectiveObserverElevationMode=`absolute-height`,this._observerFeatureId=null,this._updatingHandles=new C,this._frameTask=z,this._computationHandles=new a,this._externalObserverUpdate=!0}initialize(){let e=this.view.resourceController?.scheduler;this._frameTask=e?e.registerTask(B.LINE_OF_SIGHT_TOOL):z,this._intersector=new I({view:this.view}),this.addHandles([this._connectObserver(),this._connectComputations(),this._connectTargets()])}destroy(){this._computationHandles.destroy(),this._computations.removeAll(),this._updatingHandles.destroy()}get updating(){return this._frameTask.updating||this._updatingHandles.updating}get priority(){return this._frameTask.priority}set priority(e){this._frameTask.priority=e}get _computations(){return this.analysisViewData.computations}get _elevationAlignedObserverPositionRenderSpace(){return this.analysisViewData.observerEngineLocation}set _elevationAlignedObserverPositionRenderSpace(e){this.analysisViewData.observerEngineLocation=e}get _screenPixelSize(){return this.view.state.camera.computeScreenPixelSizeAt(this._elevationAlignedObserverPositionRenderSpace)}_computeResult(e){let t=e.computation,{inputPoints:n,computationResult:r}=t,{observerAdjusted:i,targetAdjusted:a}=n,{start:o,end:s}=r;h(o,i),h(s,a),this._canCompute(t)?this._computeIntersection(e):W(e),t.notifyResultChanged(),this.emit(`result-changed`,{target:e.computation.target,result:t.result})}_adjustStartEndPositions(e){let{view:n}=this,{inputPoints:r}=e,{observer:i,target:a,observerAdjusted:o,targetAdjusted:s}=r;h(o,i),h(s,a),t(n,this._intersector.intersector,r);let{observerSurfaceNormal:c,targetSurfaceNormal:l}=r,u=this._screenPixelSize,d=K;c==null?g(d,s,o):h(d,c);let f=u;_(d,d),v(d,d,Math.min(f,1)),y(o,o,d),l==null?g(d,o,s):h(d,l);let p=n.state.camera.computeScreenPixelSizeAt(s);_(d,d),v(d,d,Math.min(p,1)),y(s,s,d)}_computeIntersection({computation:e,interpolationInfo:t}){let{view:n}=this,{sceneIntersectionHelper:r,renderCoordsHelper:i}=n;if(r==null)return;let a=this._intersector.intersector,{computationResult:o,inputPoints:s}=e,{observer:c,target:l}=s,{start:u,end:d}=o,f=M(u,d,q);a.options.store=0,r.intersectToolIntersectorRay(f,a);let p=a.results.min,m=o.intersection,g=K,_=p!=null&&p.getIntersectionPoint(m),v=!0;if(_){h(t.originalIntersection,m),h(t.originalObserver,u),h(t.originalTarget,d),i.fromRenderCoords(m,g,n.spatialReference);let e=1-b(d,l)/b(u,l);v=b(c,m)>=e*b(c,l)}let y=new w(g,n.spatialReference);{let{result:t,target:r}=e;t==null?e.result=new P({target:r,elevationAlignedTargetLocation:e.elevationAlignedTargetLocation,intersectedGraphic:v?null:R(p,n),intersectedLocation:v?null:y,visible:v}):(t.target=r,t.intersectedGraphic=v?null:R(p,n),t.intersectedLocation=v?null:y,t.visible=v)}o.isValid=s.isValid=!0,o.isTargetVisible=v}_canCompute(e){let t=this.analysisViewData.elevationAlignedObserver,{frustum:n}=this.view;if(t==null||e.elevationAlignedTargetLocation==null||n==null)return!1;let{observerAdjusted:r,targetAdjusted:i}=e.inputPoints,a=n.intersectsPoint(r),o=n.intersectsPoint(i);return a&&o}_onObserverPositionChange(e,t,r,i,a){if(this._externalObserverUpdate=a,e==null){this.analysisViewData.elevationAlignedObserver=null,this._observerFeatureId=null;return}if(t==null){L(this.analysis,e.spatialReference,c.getLogger(this)),this.analysisViewData.elevationAlignedObserver=null;return}let o=H(t,r),{absoluteZ:s,elevation:l}=N(t.x,t.y,t.z,this.view.spatialReference,this.view,o),u=t.clone();u.z=s,this._effectiveObserverElevationMode=o.mode,this.analysisViewData.elevationAlignedObserver=u;let d=S();this.view.renderCoordsHelper.toRenderCoords(u,d),this._elevationAlignedObserverPositionRenderSpace=d,this._observerGroundOffsetRenderSpace=s-l,this._observerFeatureId=n(i),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onObserverRenderSpacePositionChangeForComputation(e,t,n,r,i){let{inputPoints:a}=e;switch(h(a.observer,t),a.observerFeatureId=i,a.observerSurfaceNormal=null,r){case`on-the-ground`:case`relative-to-ground`:{let e=this._intersector.updateFromGroundIntersection(a.observer,n,a.observer);a.observerFeatureId??(a.observerSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onTargetPositionChange(e,t,r,i,a,o=!0){let s=e.inputPoints;if(o&&(s.isValid=!1),r==null){t!=null&&L(this.analysis,t.spatialReference,c.getLogger(this)),e.elevationAlignedTargetLocation=null,e.notifyInputPointsChanged();return}let l=H(r,i),{absoluteZ:u,elevation:d}=N(r.x,r.y,r.z,this.view.spatialReference,this.view,l),f=r.clone();switch(f.z=u,e.elevationAlignedTargetLocation=f,this.view.renderCoordsHelper.toRenderCoords(e.elevationAlignedTargetLocation,s.target),s.targetFeatureId=n(a),s.targetSurfaceNormal=null,l.mode){case`on-the-ground`:case`relative-to-ground`:{let e=this._intersector.updateFromGroundIntersection(s.target,u-d,s.target);s.targetFeatureId??(s.targetSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_connectComputationToTarget(e){return o([this._updatingHandles.add(()=>({computation:e,targetPosition:e.target.position,targetElevationInfoDependency:U(e.target.elevationInfo),targetFeatureInfo:e.target.feature,projectedTargetPosition:T(e.target.position,this.view.spatialReference)}),({computation:e,targetPosition:t,targetFeatureInfo:n,projectedTargetPosition:r})=>{r.pending==null?this._onTargetPositionChange(e,t,r.geometry,e.target.elevationInfo,n):this._updatingHandles.consumePromise(r.pending)},d)])}_connectComputationToObserver(e){return this._updatingHandles.add(()=>({computation:e,observer:this.analysisViewData.elevationAlignedObserver}),({computation:e})=>{this._externalObserverUpdate&&(e.inputPoints.isValid=!1,e.notifyInputPointsChanged())},d)}_connectComputationToRenderSpaceObserver(e){return this._updatingHandles.add(()=>({computation:e,observer:this._elevationAlignedObserverPositionRenderSpace,observerGroundOffset:this._observerGroundOffsetRenderSpace,observerElevationMode:this._effectiveObserverElevationMode,observerFeatureId:this._observerFeatureId}),({computation:e,observer:t,observerGroundOffset:n,observerElevationMode:r,observerFeatureId:i})=>{this._onObserverRenderSpacePositionChangeForComputation(e,t,n,r,i)},d)}_connectComputationToCamera(e){return this._updatingHandles.add(()=>({camera:this.view.state.camera,isDirty:this._isCameraDirty}),({isDirty:t})=>{!this.updateOnCameraChange||e.inputPoints.isValid&&!t||e.notifyInputPointsChanged()})}_connectComputationToSlicePlane(e){return this._updatingHandles.add(()=>this.view.slice.plane,()=>{e.inputPoints.isValid=!1,e.notifyInputPointsChanged()})}_connectComputationToElevation(e){let t=(n,r)=>{let i=this.analysis.observer,a=e.target,o=null,s=null,c=null,l=null,u=null,d=null;if(i?.position!=null){let e=T(i.position,this.view.spatialReference);if(e.pending!=null){this._updatingHandles.consumePromise(e.pending),e.pending.finally(()=>t(n,r));return}o=e.geometry,s=i.elevationInfo,c=i.feature}if(a.position!=null){let e=T(a.position,this.view.spatialReference);if(e.pending!=null){this._updatingHandles.consumePromise(e.pending),e.pending.finally(()=>t(n,r));return}l=e.geometry,u=a.elevationInfo,d=a.feature}(o!=null||l!=null)&&(E(n,r,J,this.view.spatialReference),o!=null&&k(J,o)&&this._onObserverPositionChange(i==null?null:i.position,o,s,c,!1),l!=null&&k(J,l)&&this._onTargetPositionChange(e,a.position,l,u,d,!1),o!=null&&l!=null&&A(J,o,l)&&e.notifyInputPointsChanged())};return this.view.elevationProvider.on(`elevation-change`,({extent:e,spatialReference:n})=>t(e,n))}_connectComputationToTask(e){let t=null,n={computation:e,interpolationInfo:{originalIntersection:S(),originalObserver:S(),originalTarget:S()}};return o([this._updatingHandles.add(()=>e.inputPoints,()=>{t=l(t),t=r(async e=>{await u(this._frameTask.schedule(()=>this._computeResult(n),e))})},{initial:!0,equals:()=>!1}),s(()=>t=l(t))])}_connectComputationToContent(e){return f(()=>this.view.pointsOfInterest?.contentGeometryUpdates.events,`request-update`,t=>{let n=t?.renderBounds,{observerAdjusted:r,targetAdjusted:i}=e.inputPoints;(n==null||D(n,r,i))&&(e.inputPoints.isValid=!1,e.notifyInputPointsChanged())})}_connectComputation(e){let t=this._computationHandles;t.has(e)||t.add([this._connectComputationToTarget(e),this._connectComputationToObserver(e),this._connectComputationToRenderSpaceObserver(e),this._connectComputationToCamera(e),this._connectComputationToSlicePlane(e),this._connectComputationToElevation(e),this._connectComputationToTask(e),this._connectComputationToContent(e)],e)}_disconnectComputation(e){this._computationHandles.remove(e)}_onComputationCollectionChange({added:e,removed:t}){for(let e of t)this._disconnectComputation(e);for(let t of e)this._connectComputation(t)}_onTargetCollectionChange({added:e,removed:t}){for(let e of t)this._removeTarget(e);for(let t of e)this._addTarget(t)}_onCursorTargetChange(e,t){t!=null&&this._removeTarget(t),e!=null&&this._addTarget(e)}_addTarget(e){this._computations.some(t=>t.target===e)||this._computations.add(new F({target:e}))}_removeTarget(e){let t=this._computations.findIndex(t=>t.target===e);this._computations.removeAt(t)}_connectObserver(){return o([this._updatingHandles.add(()=>({observerPosition:this.analysis.observer==null?null:this.analysis.observer.position,projectedObserverPosition:T(this.analysis.observer==null?null:this.analysis.observer.position,this.view.spatialReference),observerElevationInfoDependency:U(this.analysis.observer?.elevationInfo),observerFeatureInfo:this.analysis.observer==null?null:this.analysis.observer.feature}),({observerPosition:e,projectedObserverPosition:t,observerFeatureInfo:n})=>{t.pending==null?this._onObserverPositionChange(e,t.geometry,this.analysis.observer?.elevationInfo,n,!0):this._updatingHandles.consumePromise(t.pending)},d)])}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this._computations,e=>this._onComputationCollectionChange(e),{initial:!0,final:!0})}_connectTargets(){return o([this._updatingHandles.addOnCollectionChange(()=>this.analysis.targets,e=>this._onTargetCollectionChange(e),{initial:!0,final:!0}),this._updatingHandles.add(()=>this.analysisViewData.cursorTarget,(e,t)=>{this._onCursorTargetChange(e,t)})])}get _isCameraDirty(){let e=this.analysisViewData.elevationAlignedObserver,{view:t}=this,{renderCoordsHelper:n}=t;if(e==null||n==null)return!1;let r=K;n.toRenderCoords(e,r);let i=t.state.camera.computeScreenPixelSizeAt(r);return Math.abs((i-this._screenPixelSize)/this._screenPixelSize)>G}};e([p({constructOnly:!0})],V.prototype,`analysis`,void 0),e([p({constructOnly:!0})],V.prototype,`analysisViewData`,void 0),e([p({constructOnly:!0})],V.prototype,`view`,void 0),e([p()],V.prototype,`updating`,null),e([p()],V.prototype,`priority`,null),e([p()],V.prototype,`updateOnCameraChange`,void 0),e([p()],V.prototype,`_computations`,null),e([p()],V.prototype,`_elevationAlignedObserverPositionRenderSpace`,null),e([p()],V.prototype,`_observerGroundOffsetRenderSpace`,void 0),e([p()],V.prototype,`_effectiveObserverElevationMode`,void 0),e([p()],V.prototype,`_observerFeatureId`,void 0),e([p()],V.prototype,`_screenPixelSize`,null),e([p({readOnly:!0})],V.prototype,`_updatingHandles`,void 0),e([p()],V.prototype,`_frameTask`,void 0),e([p()],V.prototype,`_isCameraDirty`,null),V=e([m(`esri.views.3d.analysis.LineOfSight.LineOfSightController`)],V);function H(e,t){return e.hasZ?t??{mode:`absolute-height`,offset:0}:{mode:`on-the-ground`,offset:0}}function U(e){return{mode:e?.mode,offset:e?.offset,unit:e?.unit}}function W({computation:e,interpolationInfo:t}){let{computationResult:n,inputPoints:r}=e,{start:i,end:a,intersection:o}=n,{originalIntersection:s,originalObserver:c,originalTarget:l}=t;if(h(o,s),r.isValid){let e=K,t=b(c,s)/b(c,l);x(e,i,c),v(e,e,1-t),y(o,o,e),x(e,a,l),v(e,e,t),y(o,o,e),n.isValid=!0}else e.result=null,n.isValid=!1,n.isTargetVisible=!1}const G=.1,K=S(),q=j(),J=O();export{V as LineOfSightController};
2
+ import{__decorate as e}from"tslib";import{updatePointsFromFeatureReference as t,getFeatureId as n}from"../../../../analysis/featureReferenceUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{EventedAccessor as i}from"../../../../core/Evented.js";import a from"../../../../core/Handles.js";import{handlesGroup as o,makeHandle as s}from"../../../../core/handleUtils.js";import c from"../../../../core/Logger.js";import{abortMaybe as l}from"../../../../core/maybe.js";import{ignoreAbortErrors as u}from"../../../../core/promiseUtils.js";import{initial as d,on as f}from"../../../../core/reactiveUtils.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{copy as h,subtract as g,normalize as _,scale as v,add as y,dist as b,sub as x}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as S}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as C}from"../../../../core/support/UpdatingHandles.js";import w from"../../../../geometry/Point.js";import{projectOrLoad as T}from"../../../../geometry/projectionUtils.js";import{intersectsSegment as E}from"../../../../geometry/support/aaBoundingBox.js";import{empty as D,intersectsSegment as O}from"../../../../geometry/support/aaBoundingRect.js";import{create as k,fromPoints as A}from"../../../../geometry/support/ray.js";import{zValueInAbsoluteHeightMode as j}from"../../../../support/elevationInfoUtils.js";import M from"../LineOfSightAnalysisResult.js";import{LineOfSightComputation as N}from"./LineOfSightComputation.js";import{LineOfSightRayIntersector as P}from"./LineOfSightRayIntersector.js";import{logFailedGeometryProjectionError as F}from"../support/projectionUtils.js";import{projectElevationUpdateExtent as I,containsElevationUpdatePoint as L}from"../../support/elevationUpdateExtentUtils.js";import{toGraphic as R}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{ImmediateTask as z,TaskPriority as B}from"../../../support/Scheduler.js";let V=class extends i{constructor(e){super(e),this.updateOnCameraChange=!0,this._observerGroundOffsetRenderSpace=0,this._effectiveObserverElevationMode=`absolute-height`,this._observerFeatureId=null,this._updatingHandles=new C,this._frameTask=z,this._computationHandles=new a,this._externalObserverUpdate=!0}initialize(){let e=this.view.resourceController?.scheduler;this._frameTask=e?e.registerTask(B.LINE_OF_SIGHT_TOOL):z,this._intersector=new P({view:this.view}),this.addHandles([this._connectObserver(),this._connectComputations(),this._connectTargets()])}destroy(){this._computationHandles.destroy(),this._computations.removeAll(),this._updatingHandles.destroy()}get updating(){return this._frameTask.updating||this._updatingHandles.updating}get priority(){return this._frameTask.priority}set priority(e){this._frameTask.priority=e}get _computations(){return this.analysisViewData.computations}get _elevationAlignedObserverPositionRenderSpace(){return this.analysisViewData.observerEngineLocation}set _elevationAlignedObserverPositionRenderSpace(e){this.analysisViewData.observerEngineLocation=e}get _screenPixelSize(){return this.view.state.camera.computeScreenPixelSizeAt(this._elevationAlignedObserverPositionRenderSpace)}_computeResult(e){let t=e.computation,{inputPoints:n,computationResult:r}=t,{observerAdjusted:i,targetAdjusted:a}=n,{start:o,end:s}=r;h(o,i),h(s,a),this._canCompute(t)?this._computeIntersection(e):W(e),t.notifyResultChanged(),this.emit(`result-changed`,{target:e.computation.target,result:t.result})}_adjustStartEndPositions(e){let{view:n}=this,{inputPoints:r}=e,{observer:i,target:a,observerAdjusted:o,targetAdjusted:s}=r;h(o,i),h(s,a),t(n,this._intersector.intersector,r);let{observerSurfaceNormal:c,targetSurfaceNormal:l}=r,u=this._screenPixelSize,d=K;c==null?g(d,s,o):h(d,c);let f=u;_(d,d),v(d,d,Math.min(f,1)),y(o,o,d),l==null?g(d,o,s):h(d,l);let p=n.state.camera.computeScreenPixelSizeAt(s);_(d,d),v(d,d,Math.min(p,1)),y(s,s,d)}_computeIntersection({computation:e,interpolationInfo:t}){let{view:n}=this,{sceneIntersectionHelper:r,renderCoordsHelper:i}=n;if(r==null)return;let a=this._intersector.intersector,{computationResult:o,inputPoints:s}=e,{observer:c,target:l}=s,{start:u,end:d}=o,f=A(u,d,q);a.options.store=0,r.intersectToolIntersectorRay(f,a);let p=a.results.min,m=o.intersection,g=K,_=p!=null&&p.getIntersectionPoint(m),v=!0;if(_){h(t.originalIntersection,m),h(t.originalObserver,u),h(t.originalTarget,d),i.fromRenderCoords(m,g,n.spatialReference);let e=1-b(d,l)/b(u,l);v=b(c,m)>=e*b(c,l)}let y=new w(g,n.spatialReference);{let{result:t,target:r}=e;t==null?e.result=new M({target:r,elevationAlignedTargetLocation:e.elevationAlignedTargetLocation,intersectedGraphic:v?null:R(p,n),intersectedLocation:v?null:y,visible:v}):(t.target=r,t.intersectedGraphic=v?null:R(p,n),t.intersectedLocation=v?null:y,t.visible=v)}o.isValid=s.isValid=!0,o.isTargetVisible=v}_canCompute(e){let t=this.analysisViewData.elevationAlignedObserver,{frustum:n}=this.view;if(t==null||e.elevationAlignedTargetLocation==null||n==null)return!1;let{observerAdjusted:r,targetAdjusted:i}=e.inputPoints,a=n.intersectsPoint(r),o=n.intersectsPoint(i);return a&&o}_onObserverPositionChange(e,t,r,i,a){if(this._externalObserverUpdate=a,e==null){this.analysisViewData.elevationAlignedObserver=null,this._observerFeatureId=null;return}if(t==null){F(this.analysis,e.spatialReference,c.getLogger(this)),this.analysisViewData.elevationAlignedObserver=null;return}let o=H(t,r),{absoluteZ:s,elevation:l}=j(t.x,t.y,t.z,this.view.spatialReference,this.view,o),u=t.clone();u.z=s,this._effectiveObserverElevationMode=o.mode,this.analysisViewData.elevationAlignedObserver=u;let d=S();this.view.renderCoordsHelper.toRenderCoords(u,d),this._elevationAlignedObserverPositionRenderSpace=d,this._observerGroundOffsetRenderSpace=s-l,this._observerFeatureId=n(i),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onObserverRenderSpacePositionChangeForComputation(e,t,n,r,i){let{inputPoints:a}=e;switch(h(a.observer,t),a.observerFeatureId=i,a.observerSurfaceNormal=null,r){case`on-the-ground`:case`relative-to-ground`:{let e=this._intersector.updateFromGroundIntersection(a.observer,n,a.observer);a.observerFeatureId??(a.observerSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onTargetPositionChange(e,t,r,i,a,o=!0){let s=e.inputPoints;if(o&&(s.isValid=!1),r==null){t!=null&&F(this.analysis,t.spatialReference,c.getLogger(this)),e.elevationAlignedTargetLocation=null,e.notifyInputPointsChanged();return}let l=H(r,i),{absoluteZ:u,elevation:d}=j(r.x,r.y,r.z,this.view.spatialReference,this.view,l),f=r.clone();switch(f.z=u,e.elevationAlignedTargetLocation=f,this.view.renderCoordsHelper.toRenderCoords(e.elevationAlignedTargetLocation,s.target),s.targetFeatureId=n(a),s.targetSurfaceNormal=null,l.mode){case`on-the-ground`:case`relative-to-ground`:{let e=this._intersector.updateFromGroundIntersection(s.target,u-d,s.target);s.targetFeatureId??(s.targetSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_connectComputationToTarget(e){return o([this._updatingHandles.add(()=>({computation:e,targetPosition:e.target.position,targetElevationInfoDependency:U(e.target.elevationInfo),targetFeatureInfo:e.target.feature,projectedTargetPosition:T(e.target.position,this.view.spatialReference)}),({computation:e,targetPosition:t,targetFeatureInfo:n,projectedTargetPosition:r})=>{r.pending==null?this._onTargetPositionChange(e,t,r.geometry,e.target.elevationInfo,n):this._updatingHandles.consumePromise(r.pending)},d)])}_connectComputationToObserver(e){return this._updatingHandles.add(()=>({computation:e,observer:this.analysisViewData.elevationAlignedObserver}),({computation:e})=>{this._externalObserverUpdate&&(e.inputPoints.isValid=!1,e.notifyInputPointsChanged())},d)}_connectComputationToRenderSpaceObserver(e){return this._updatingHandles.add(()=>({computation:e,observer:this._elevationAlignedObserverPositionRenderSpace,observerGroundOffset:this._observerGroundOffsetRenderSpace,observerElevationMode:this._effectiveObserverElevationMode,observerFeatureId:this._observerFeatureId}),({computation:e,observer:t,observerGroundOffset:n,observerElevationMode:r,observerFeatureId:i})=>{this._onObserverRenderSpacePositionChangeForComputation(e,t,n,r,i)},d)}_connectComputationToCamera(e){return this._updatingHandles.add(()=>({camera:this.view.state.camera,isDirty:this._isCameraDirty}),({isDirty:t})=>{!this.updateOnCameraChange||e.inputPoints.isValid&&!t||e.notifyInputPointsChanged()})}_connectComputationToSlicePlane(e){return this._updatingHandles.add(()=>this.view.slice.plane,()=>{e.inputPoints.isValid=!1,e.notifyInputPointsChanged()})}_connectComputationToElevation(e){let t=(n,r)=>{let i=this.analysis.observer,a=e.target,o=null,s=null,c=null,l=null,u=null,d=null;if(i?.position!=null){let e=T(i.position,this.view.spatialReference);if(e.pending!=null){this._updatingHandles.consumePromise(e.pending),e.pending.finally(()=>t(n,r));return}o=e.geometry,s=i.elevationInfo,c=i.feature}if(a.position!=null){let e=T(a.position,this.view.spatialReference);if(e.pending!=null){this._updatingHandles.consumePromise(e.pending),e.pending.finally(()=>t(n,r));return}l=e.geometry,u=a.elevationInfo,d=a.feature}(o!=null||l!=null)&&(I(n,r,J,this.view.spatialReference),o!=null&&L(J,o.x,o.y,this.view.spatialReference)&&this._onObserverPositionChange(i==null?null:i.position,o,s,c,!1),l!=null&&L(J,l.x,l.y,this.view.spatialReference)&&this._onTargetPositionChange(e,a.position,l,u,d,!1),o!=null&&l!=null&&O(J,o,l)&&e.notifyInputPointsChanged())};return this.view.elevationProvider.on(`elevation-change`,({extent:e,spatialReference:n})=>t(e,n))}_connectComputationToTask(e){let t=null,n={computation:e,interpolationInfo:{originalIntersection:S(),originalObserver:S(),originalTarget:S()}};return o([this._updatingHandles.add(()=>e.inputPoints,()=>{t=l(t),t=r(async e=>{await u(this._frameTask.schedule(()=>this._computeResult(n),e))})},{initial:!0,equals:()=>!1}),s(()=>t=l(t))])}_connectComputationToContent(e){return f(()=>this.view.pointsOfInterest?.contentGeometryUpdates.events,`request-update`,t=>{let n=t?.renderBounds,{observerAdjusted:r,targetAdjusted:i}=e.inputPoints;(n==null||E(n,r,i))&&(e.inputPoints.isValid=!1,e.notifyInputPointsChanged())})}_connectComputation(e){let t=this._computationHandles;t.has(e)||t.add([this._connectComputationToTarget(e),this._connectComputationToObserver(e),this._connectComputationToRenderSpaceObserver(e),this._connectComputationToCamera(e),this._connectComputationToSlicePlane(e),this._connectComputationToElevation(e),this._connectComputationToTask(e),this._connectComputationToContent(e)],e)}_disconnectComputation(e){this._computationHandles.remove(e)}_onComputationCollectionChange({added:e,removed:t}){for(let e of t)this._disconnectComputation(e);for(let t of e)this._connectComputation(t)}_onTargetCollectionChange({added:e,removed:t}){for(let e of t)this._removeTarget(e);for(let t of e)this._addTarget(t)}_onCursorTargetChange(e,t){t!=null&&this._removeTarget(t),e!=null&&this._addTarget(e)}_addTarget(e){this._computations.some(t=>t.target===e)||this._computations.add(new N({target:e}))}_removeTarget(e){let t=this._computations.findIndex(t=>t.target===e);this._computations.removeAt(t)}_connectObserver(){return o([this._updatingHandles.add(()=>({observerPosition:this.analysis.observer==null?null:this.analysis.observer.position,projectedObserverPosition:T(this.analysis.observer==null?null:this.analysis.observer.position,this.view.spatialReference),observerElevationInfoDependency:U(this.analysis.observer?.elevationInfo),observerFeatureInfo:this.analysis.observer==null?null:this.analysis.observer.feature}),({observerPosition:e,projectedObserverPosition:t,observerFeatureInfo:n})=>{t.pending==null?this._onObserverPositionChange(e,t.geometry,this.analysis.observer?.elevationInfo,n,!0):this._updatingHandles.consumePromise(t.pending)},d)])}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this._computations,e=>this._onComputationCollectionChange(e),{initial:!0,final:!0})}_connectTargets(){return o([this._updatingHandles.addOnCollectionChange(()=>this.analysis.targets,e=>this._onTargetCollectionChange(e),{initial:!0,final:!0}),this._updatingHandles.add(()=>this.analysisViewData.cursorTarget,(e,t)=>{this._onCursorTargetChange(e,t)})])}get _isCameraDirty(){let e=this.analysisViewData.elevationAlignedObserver,{view:t}=this,{renderCoordsHelper:n}=t;if(e==null||n==null)return!1;let r=K;n.toRenderCoords(e,r);let i=t.state.camera.computeScreenPixelSizeAt(r);return Math.abs((i-this._screenPixelSize)/this._screenPixelSize)>G}};e([p({constructOnly:!0})],V.prototype,`analysis`,void 0),e([p({constructOnly:!0})],V.prototype,`analysisViewData`,void 0),e([p({constructOnly:!0})],V.prototype,`view`,void 0),e([p()],V.prototype,`updating`,null),e([p()],V.prototype,`priority`,null),e([p()],V.prototype,`updateOnCameraChange`,void 0),e([p()],V.prototype,`_computations`,null),e([p()],V.prototype,`_elevationAlignedObserverPositionRenderSpace`,null),e([p()],V.prototype,`_observerGroundOffsetRenderSpace`,void 0),e([p()],V.prototype,`_effectiveObserverElevationMode`,void 0),e([p()],V.prototype,`_observerFeatureId`,void 0),e([p()],V.prototype,`_screenPixelSize`,null),e([p({readOnly:!0})],V.prototype,`_updatingHandles`,void 0),e([p()],V.prototype,`_frameTask`,void 0),e([p()],V.prototype,`_isCameraDirty`,null),V=e([m(`esri.views.3d.analysis.LineOfSight.LineOfSightController`)],V);function H(e,t){return e.hasZ?t??{mode:`absolute-height`,offset:0}:{mode:`on-the-ground`,offset:0}}function U(e){return{mode:e?.mode,offset:e?.offset,unit:e?.unit}}function W({computation:e,interpolationInfo:t}){let{computationResult:n,inputPoints:r}=e,{start:i,end:a,intersection:o}=n,{originalIntersection:s,originalObserver:c,originalTarget:l}=t;if(h(o,s),r.isValid){let e=K,t=b(c,s)/b(c,l);x(e,i,c),v(e,e,1-t),y(o,o,e),x(e,a,l),v(e,e,t),y(o,o,e),n.isValid=!0}else e.result=null,n.isValid=!1,n.isTargetVisible=!1}const G=.1,K=S(),q=k(),J=D();export{V as LineOfSightController};
@@ -8,7 +8,11 @@ import type { AbortOptions } from "../../../../core/promiseUtils.js";
8
8
  import type { ElevationInfoProperties } from "../../../../symbols/support/ElevationInfo.js";
9
9
 
10
10
  /**
11
- * Elevation information used when placing a line-of-sight analysis interactively.
11
+ * Elevation information used when placing a line of sight analysis interactively.
12
+ *
13
+ * > [!WARNING]
14
+ * >
15
+ * > [ElevationInfo.featureExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/#featureExpressionInfo) is not supported when the elevation info is specified for observers and targets.
12
16
  *
13
17
  * @since 5.2
14
18
  */
@@ -25,8 +29,15 @@ export type LineOfSightPlacementElevationInfo = ElevationInfo | ElevationInfoPro
25
29
  export interface LineOfSightPlacementOptions extends AbortOptions {
26
30
  /**
27
31
  * Specifies how placed items are positioned on the vertical axis (z). A single elevation information object applies
28
- * to both the observer and targets. Alternatively, separate elevation information can be provided for each.
29
- * When omitted, positions are stored with absolute heights.
32
+ * to both the observer and targets. Alternatively, separate elevation information can be provided for each type.
33
+ *
34
+ * If no elevation info is provided and the [LineOfSightAnalysisObserver.position](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisObserver/#position) or the
35
+ * [LineOfSightAnalysisTarget.position](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/#position) has a [z-value](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/#hasZ),
36
+ * it is treated as an absolute value.
37
+ *
38
+ * > [!WARNING]
39
+ * >
40
+ * > [ElevationInfo.featureExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/#featureExpressionInfo) is not supported when the elevation info is specified for observers and targets.
30
41
  *
31
42
  * @since 5.2
32
43
  */
@@ -13,9 +13,10 @@ import type { LineOfSightPlacementOptions, LineOfSightPlacementResult } from "./
13
13
  * The LineOfSightAnalysisView3D is responsible for rendering a [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/)
14
14
  * using custom visualizations.
15
15
  *
16
- * It allows to create an observer and/or targets interactively using the [place()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#place) method, query analysis [results](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#results),
16
+ * It allows to create an observer and targets interactively using the [place()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#place) method, query analysis [results](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#results),
17
17
  * or make an existing analysis editable by enabling the [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#interactive) property.
18
18
  *
19
+ *
19
20
  * The view for an analysis can be retrieved using [SceneView.whenAnalysisView()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#whenAnalysisView)
20
21
  * similar to how layer views are retrieved for layers using [SceneView.whenLayerView()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#whenLayerView).
21
22
  *
@@ -26,11 +27,22 @@ import type { LineOfSightPlacementOptions, LineOfSightPlacementResult } from "./
26
27
  * const analysisView = await view.whenAnalysisView(analysis);
27
28
  * ```
28
29
  *
30
+ * > [!WARNING]
31
+ * >
32
+ * > **Things to consider:**
33
+ * > * Snapping, tooltips, display units, and input units used during interactive placement and editing are inherited from
34
+ * [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
35
+ * > * Snapping is enabled by default. This can be temporarily disabled by holding the `CTRL` key.
36
+ * > * Layer types currently supported for snapping are: [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) (except Mesh geometries),
37
+ * > [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
38
+ * > [3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), and [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/).
39
+ *
29
40
  * @see [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/)
30
41
  * @see [LineOfSightLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/)
31
42
  * @see [LineOfSightLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/)
32
- * @see [LineOfSightAnalysisTarget](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/)
33
43
  * @see [LineOfSightAnalysisObserver](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisObserver/)
44
+ * @see [LineOfSightAnalysisTarget](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/)
45
+ * @see [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/)
34
46
  * @see [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-line-of-sight/)
35
47
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
36
48
  * @see [Sample - Line of sight component](https://developers.arcgis.com/javascript/latest/sample-code/line-of-sight/)
@@ -44,10 +56,12 @@ export default abstract class LineOfSightAnalysisView3D extends AnalysisView3D {
44
56
  */
45
57
  get analysis(): LineOfSightAnalysis;
46
58
  /**
47
- * Enables interactivity for the associated [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#analysis). When set to `true`, manipulators will be displayed,
48
- * allowing users to click and drag to edit the analysis if it has a valid
49
- * [LineOfSightAnalysis.observer](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/#observer) and
50
- * [LineOfSightAnalysis.targets](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/#targets). Right-clicking a target will remove it.
59
+ * Enables interactivity for the [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#analysis).
60
+ * When set to `true`, and the analysis includes a valid [LineOfSightAnalysis.observer](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/#observer) and any
61
+ * [LineOfSightAnalysis.targets](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/#targets), they become selectable and editable.
62
+ *
63
+ * Targets can be removed by right-clicking on them or with the `Delete` key.
64
+ * The observer and the last target cannot be deleted interactively.
51
65
  *
52
66
  * This property is automatically set to `true` when the analysis is assigned to a
53
67
  * [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-line-of-sight/).
@@ -76,8 +90,13 @@ export default abstract class LineOfSightAnalysisView3D extends AnalysisView3D {
76
90
  */
77
91
  get results(): Collection<LineOfSightAnalysisResult | null | undefined>;
78
92
  /**
79
- * The observer or target currently selected for interactive editing. Use the item's `type` property to determine
80
- * whether it is an observer or a target.
93
+ * The observer or target currently selected for interactive editing.
94
+ *
95
+ * When [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#interactive) is `true`, any observer or target in the
96
+ * [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#analysis) can be selected
97
+ * and its properties can be edited by interacting with the manipulators in the view.
98
+ *
99
+ * Use the item's `type` property to determine whether it is an observer or a target.
81
100
  *
82
101
  * @since 5.2
83
102
  * @example
@@ -111,7 +130,7 @@ export default abstract class LineOfSightAnalysisView3D extends AnalysisView3D {
111
130
  get visible(): boolean;
112
131
  set visible(value: boolean | null | undefined);
113
132
  /**
114
- * Starts the interactive placement of an observer and/or targets on the [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#analysis).
133
+ * Starts the interactive placement of an observer and targets on the [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#analysis).
115
134
  *
116
135
  * If the analysis does not have a valid observer yet, this method will allow placing an observer, which can be followed
117
136
  * by zero or more targets. Otherwise, if it already has a valid observer, it will allow placing targets. An observer
@@ -123,9 +142,13 @@ export default abstract class LineOfSightAnalysisView3D extends AnalysisView3D {
123
142
  * The promise resolves when the operation is productive, i.e. an observer or any targets were added.
124
143
  * Otherwise, if nothing was added or signal was aborted, the promise is rejected.
125
144
  *
145
+ * By default, the observer and targets are created at absolute height.
146
+ * Optionally, by specifying the options of the method,
147
+ * you can change the [elevation info](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/).
148
+ *
126
149
  * Calling this method sets [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/#interactive) to `true`.
127
150
  *
128
- * @param options - An object specifying additional options.
151
+ * @param options - An object specifying additional placement options, including elevation information and an abort signal.
129
152
  * @returns A promise
130
153
  * which resolves when the operation is completed successfully - i.e. the user places an observer and/or target(s),
131
154
  * leaving the analysis in a valid state. Otherwise, the promise is rejected.
@@ -135,11 +158,14 @@ export default abstract class LineOfSightAnalysisView3D extends AnalysisView3D {
135
158
  *
136
159
  * try {
137
160
  * await analysisView.place({
138
- * elevationInfo: { mode: "relative-to-ground", offset: 2 },
139
- * signal: abortController.signal
161
+ * signal: abortController.signal,
162
+ * // optional elevation info
163
+ * elevationInfo: { mode: "relative-to-ground", offset: 1.5 },
140
164
  * });
141
165
  * } catch (error) {
142
- * // handle error
166
+ * if (error.name === "AbortError") {
167
+ * console.log("Placement operation was cancelled.");
168
+ * }
143
169
  * }
144
170
  *
145
171
  * // cancel the placement operation at some later point
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as n}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as r,removeMaybe as i}from"../../../../core/maybe.js";import{watch as a,sync as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{ViewshedInteractionVisuals as d}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as f}from"./ViewshedSnappingController.js";import{ViewshedSubTool as p}from"./ViewshedSubTool.js";import{findSubTool as m}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as h}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as g}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import{bindViewToolOptions as v}from"../../../interactive/options/bindViewToolOptions.js";import y from"../../../interactive/options/InteractiveToolOptions.js";import{enterInputModeIfAvailable as b,makeTooltip as x}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as S}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";const C=Symbol(`inactiveManipulatorDisplay`);let w=class extends g{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._selectedManipulator=null,this._observerToolOptions=new y,this._observerTooltipConnectionHandle=null,this._updatingHandles=new u}initialize(){let{snappingManager:e,view:t}=this;this._interactionVisuals=new d({view:t}),this._snappingController=new f({snappingManager:e,view:t}),this._initializeObserverTooltip(t);let r=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=n(()=>r,({viewshedComputedData:e})=>{let t=new p({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([v(this._observerToolOptions,()=>t.options),a(()=>this.firstGrabbedManipulator,e=>{if(e!=null){let t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},o),a(()=>({grabbedManipulator:this.firstGrabbedManipulator,subTools:this.subToolHandles.map(({subTool:e})=>e).toArray()}),({grabbedManipulator:e,subTools:t})=>{let n=e==null?[]:t.map(t=>t.hideInactiveManipulators(e));this.removeHandles(C),this.addHandles(n,C),t.forEach(t=>t.setInteractive(t=>e==null||t===e))},o),this._updatingHandles.add(()=>{let e=this.selectedViewshedComputedData;return e==null?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(e==null)return;let{subTool:t,observer:n,target:r}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(n,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(r,!1)},s),this._updatingHandles.add(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),s),this._updatingHandles.add(()=>this.selectedViewshed,e=>{let t=this._selectedManipulator,n=this._selectedSubTool;this._connectObserverTooltip(n),e==null?this._selectManipulator(null):(t==null||!n.hasManipulator(t))&&this._selectManipulator(n.observerManipulator)},s)])}destroy(){this.removeHandles(C),this._selectManipulator(null),this._disconnectObserverTooltip(),r(this.subToolHandles),r(this._interactionVisuals),r(this._snappingController),r(this._observerTooltip),this._updatingHandles.destroy()}get updating(){return!!this._snappingController?.updating||this._updatingHandles.updating||this.subToolHandles.some(({subTool:e})=>e.updating)}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){let t=this._selectedSubTool,n=this.selectedViewshedComputedData;if(t==null||n==null){this._interactionVisuals?.setVisibility(!1);return}let r=t.moveInteractionState,i=e?r.grabbing:r.dragging,a=t.scaleOrientInteractionState,o=e?a.grabbing:a.dragging;if(!(this.analysisViewData.visible&&(i||o))){this._interactionVisuals?.setVisibility(!1);return}let s=i?n.elevationAlignedObserverRenderSpace:n.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:s,laserlineVisible:!0,verticalLineVisible:i,intersectsWorldUp:i})}createObserverMoveSnappingPipeline(e,t,n,r=!1){return this._snappingController.createObserverMoveSnappingPipeline(e,t,n,r)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!b(e,this._observerTooltip))switch(e.type){case`key-down`:_.cancel===e.key?this._cancelKeyHandler(e):_.delete.includes(e.key)&&this._deleteKeyHandler(e);break;case`hold`:this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){let t=this._observerToolOptions;this._observerTooltip=x(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new S({toolOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),e==null){this._observerTooltip.clear();return}let t=e.observerManipulatedObject;this._observerTooltipConnectionHandle=h(this._observerTooltip,t,()=>({toolOptions:this._observerToolOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=i(this._observerTooltipConnectionHandle)}_cancelKeyHandler(e){this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_deleteKeyHandler(e){let t=this.selectedViewshed;t!=null&&(this.analysis.viewsheds.remove(t),e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return m(this.subToolHandles,e)}_selectManipulator(e){let t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,t!=null&&(t.selected=!1),e!=null&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([c({constructOnly:!0})],w.prototype,`analysis`,void 0),e([c({constructOnly:!0})],w.prototype,`analysisViewData`,void 0),e([c({constructOnly:!0})],w.prototype,`intersector`,void 0),e([c({constructOnly:!0})],w.prototype,`snappingManager`,void 0),e([c({constructOnly:!0})],w.prototype,`view`,void 0),e([c()],w.prototype,`subToolHandles`,void 0),e([c()],w.prototype,`removeIncompleteOnCancel`,void 0),e([c()],w.prototype,`automaticManipulatorSelection`,void 0),e([c()],w.prototype,`multiTouchEnabled`,void 0),e([c()],w.prototype,`_selectedManipulator`,void 0),e([c()],w.prototype,`_interactionVisuals`,void 0),e([c()],w.prototype,`_snappingController`,void 0),e([c()],w.prototype,`_observerTooltip`,void 0),e([c()],w.prototype,`_observerTooltipInfo`,void 0),e([c()],w.prototype,`updating`,null),e([c()],w.prototype,`grabbing`,null),e([c()],w.prototype,`cursor`,null),e([c()],w.prototype,`selectedViewshed`,null),e([c()],w.prototype,`selectedViewshedComputedData`,null),e([c()],w.prototype,`_selectedSubTool`,null),w=e([l(`esri.views.3d.analysis.Viewshed.ViewshedEditTool`)],w);export{w as ViewshedEditTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as n}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as r,removeMaybe as i}from"../../../../core/maybe.js";import{watch as a,sync as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{ViewshedInteractionVisuals as d}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as f}from"./ViewshedSnappingController.js";import{ViewshedSubTool as p}from"./ViewshedSubTool.js";import{findSubTool as m}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as h}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as g}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import{bindViewToolOptions as v}from"../../../interactive/options/bindViewToolOptions.js";import y from"../../../interactive/options/InteractiveToolOptions.js";import{enterInputModeIfAvailable as b,makeTooltip as x}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as S}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";const C=Symbol(`inactiveManipulatorDisplay`);let w=class extends g{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._selectedManipulator=null,this._observerToolOptions=new y,this._observerTooltipConnectionHandle=null,this._updatingHandles=new u}initialize(){let{snappingManager:e,view:t}=this;this._interactionVisuals=new d({view:t}),this._snappingController=new f({snappingManager:e,view:t}),this._initializeObserverTooltip(t);let r=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=n(()=>r,({viewshedComputedData:e})=>{let t=new p({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([v(this._observerToolOptions,()=>t.options),a(()=>this.firstGrabbedManipulator,e=>{if(e!=null){let t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},o),a(()=>({grabbedManipulator:this.firstGrabbedManipulator,subTools:this.subToolHandles.map(({subTool:e})=>e).toArray()}),({grabbedManipulator:e,subTools:t})=>{let n=e==null?[]:t.map(t=>t.hideInactiveManipulators(e));this.removeHandles(C),this.addHandles(n,C),t.forEach(t=>t.setInteractive(t=>e==null||t===e))},o),this._updatingHandles.add(()=>{let e=this.selectedViewshedComputedData;return e==null?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(e==null)return;let{subTool:t,observer:n,target:r}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(n,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(r,!1)},s),this._updatingHandles.add(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),s),this._updatingHandles.add(()=>this.selectedViewshed,e=>{let t=this._selectedManipulator,n=this._selectedSubTool;this._connectObserverTooltip(n),e==null?this._selectManipulator(null):t!=null&&n.hasManipulator(t)||this._selectManipulator(n.observerManipulator)},s)])}destroy(){this.removeHandles(C),this._selectManipulator(null),this._disconnectObserverTooltip(),r(this.subToolHandles),r(this._interactionVisuals),r(this._snappingController),r(this._observerTooltip),this._updatingHandles.destroy()}get updating(){return!!this._snappingController?.updating||this._updatingHandles.updating||this.subToolHandles.some(({subTool:e})=>e.updating)}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){let t=this._selectedSubTool,n=this.selectedViewshedComputedData;if(t==null||n==null){this._interactionVisuals?.setVisibility(!1);return}let r=t.moveInteractionState,i=e?r.grabbing:r.dragging,a=t.scaleOrientInteractionState,o=e?a.grabbing:a.dragging;if(!(this.analysisViewData.visible&&(i||o))){this._interactionVisuals?.setVisibility(!1);return}let s=i?n.elevationAlignedObserverRenderSpace:n.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:s,laserlineVisible:!0,verticalLineVisible:i,intersectsWorldUp:i})}createObserverMoveSnappingPipeline(e,t,n,r=!1){return this._snappingController.createObserverMoveSnappingPipeline(e,t,n,r)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!b(e,this._observerTooltip))switch(e.type){case`key-down`:_.cancel===e.key?this._cancelKeyHandler(e):_.delete.includes(e.key)&&this._deleteKeyHandler(e);break;case`hold`:this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){let t=this._observerToolOptions;this._observerTooltip=x(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new S({toolOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),e==null){this._observerTooltip.clear();return}let t=e.observerManipulatedObject;this._observerTooltipConnectionHandle=h(this._observerTooltip,t,()=>({toolOptions:this._observerToolOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=i(this._observerTooltipConnectionHandle)}_cancelKeyHandler(e){this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_deleteKeyHandler(e){let t=this.selectedViewshed;t!=null&&(this.analysis.viewsheds.remove(t),e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return m(this.subToolHandles,e)}_selectManipulator(e){let t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,t!=null&&(t.selected=!1),e!=null&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([c({constructOnly:!0})],w.prototype,`analysis`,void 0),e([c({constructOnly:!0})],w.prototype,`analysisViewData`,void 0),e([c({constructOnly:!0})],w.prototype,`intersector`,void 0),e([c({constructOnly:!0})],w.prototype,`snappingManager`,void 0),e([c({constructOnly:!0})],w.prototype,`view`,void 0),e([c()],w.prototype,`subToolHandles`,void 0),e([c()],w.prototype,`removeIncompleteOnCancel`,void 0),e([c()],w.prototype,`automaticManipulatorSelection`,void 0),e([c()],w.prototype,`multiTouchEnabled`,void 0),e([c()],w.prototype,`_selectedManipulator`,void 0),e([c()],w.prototype,`_interactionVisuals`,void 0),e([c()],w.prototype,`_snappingController`,void 0),e([c()],w.prototype,`_observerTooltip`,void 0),e([c()],w.prototype,`_observerTooltipInfo`,void 0),e([c()],w.prototype,`updating`,null),e([c()],w.prototype,`grabbing`,null),e([c()],w.prototype,`cursor`,null),e([c()],w.prototype,`selectedViewshed`,null),e([c()],w.prototype,`selectedViewshedComputedData`,null),e([c()],w.prototype,`_selectedSubTool`,null),w=e([l(`esri.views.3d.analysis.Viewshed.ViewshedEditTool`)],w);export{w as ViewshedEditTool};
@@ -12,6 +12,13 @@ export interface ViewshedPlacementOptions extends AbortOptions {
12
12
  * Specifies how the placed viewshed observer is positioned on the vertical axis (z).
13
13
  * Accepts an [ElevationInfo](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/) instance or a plain object with elevation information properties.
14
14
  *
15
+ * If no elevation info is provided and the [Viewshed.observer](https://developers.arcgis.com/javascript/latest/references/core/analysis/Viewshed/#observer) has a [z-value](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/#hasZ),
16
+ * it is treated as an absolute value.
17
+ *
18
+ * > [!WARNING]
19
+ * >
20
+ * > [ElevationInfo.featureExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/#featureExpressionInfo) is not supported when the elevation info is specified for viewsheds.
21
+ *
15
22
  * @since 5.2
16
23
  */
17
24
  elevationInfo?: ElevationInfo | ElevationInfoProperties | null;
@@ -12,10 +12,7 @@ import type { ViewshedPlacementOptions, ViewshedPlacementResult } from "./Viewsh
12
12
  *
13
13
  * It allows to create new viewsheds interactively using the [place()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#place) method,
14
14
  * or to make existing viewsheds selectable and editable by enabling the [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#interactive) property.
15
- * To select a viewshed, hover and click on its field-of-view manipulators.
16
- *
17
- * Snapping, tooltips, display units, and input units used during interactive placement and editing are inherited from
18
- * [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
15
+ * To select a viewshed, hover and click on its observer.
19
16
  *
20
17
  * The view for an analysis can be retrieved using [SceneView.whenAnalysisView()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#whenAnalysisView)
21
18
  * similar to how layer views are retrieved for layers using [SceneView.whenLayerView()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#whenLayerView).
@@ -29,11 +26,22 @@ import type { ViewshedPlacementOptions, ViewshedPlacementResult } from "./Viewsh
29
26
  * const analysisView = await view.whenAnalysisView(analysis);
30
27
  * ```
31
28
  *
29
+ * > [!WARNING]
30
+ * >
31
+ * > **Things to consider:**
32
+ * > * Snapping, tooltips, display units, and input units used during interactive placement and editing are inherited from
33
+ * [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
34
+ * > * Snapping is enabled by default. This can be temporarily disabled by holding the `CTRL` key.
35
+ * > * Layer types currently supported for snapping are: [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) (except Mesh geometries),
36
+ * > [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
37
+ * > [3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), and [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/).
38
+ *
32
39
  * @since 4.30
33
40
  * @see [ViewshedAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ViewshedAnalysis/)
34
41
  * @see [Viewshed](https://developers.arcgis.com/javascript/latest/references/core/analysis/Viewshed/)
35
42
  * @see [ViewshedLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/)
36
43
  * @see [ViewshedLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/)
44
+ * @see [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/)
37
45
  * @see [Sample - Interactive viewshed analysis](https://developers.arcgis.com/javascript/latest/sample-code/analysis-viewshed/)
38
46
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
39
47
  * @see [3D viewshed overview](https://developers.arcgis.com/documentation/spatial-analysis-services/3d-visual/3d-viewshed/)
@@ -43,17 +51,21 @@ export default abstract class ViewshedAnalysisView3D extends AnalysisView3D {
43
51
  /** The viewshed analysis object associated with the analysis view. */
44
52
  get analysis(): ViewshedAnalysis;
45
53
  /**
46
- * Enables interactivity for the [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#analysis). When set to `true` and the analysis includes any
47
- * valid [ViewshedAnalysis.viewsheds](https://developers.arcgis.com/javascript/latest/references/core/analysis/ViewshedAnalysis/#viewsheds), they become selectable and editable.
54
+ * Enables interactivity for the [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#analysis).
55
+ * When set to `true` and the analysis includes any valid [ViewshedAnalysis.viewsheds](https://developers.arcgis.com/javascript/latest/references/core/analysis/ViewshedAnalysis/#viewsheds),
56
+ * they become selectable and editable.
57
+ *
58
+ * Viewsheds can be removed with the `Delete` key.
48
59
  *
49
60
  * @default false
50
61
  */
51
62
  accessor interactive: boolean;
52
63
  /**
53
- * The selected viewshed. If [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#interactive) is `true`, any viewshed in the
54
- * [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#analysis) can be selected by clicking on it in the view. As long as [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#interactive)
55
- * remains `true`, the properties of the selected viewshed can be edited by interacting with
56
- * manipulators in the view.
64
+ * The viewshed currently selected for interactive editing.
65
+ *
66
+ * When [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#interactive) is `true`, any viewshed in the
67
+ * [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#analysis) can be selected
68
+ * and its properties can be edited by interacting with the manipulators in the view.
57
69
  */
58
70
  accessor selectedViewshed: Viewshed | null | undefined;
59
71
  /** The analysis view type. */
@@ -71,34 +83,46 @@ export default abstract class ViewshedAnalysisView3D extends AnalysisView3D {
71
83
  *
72
84
  * This method is similar to the [place()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#place) method, but it allows to create multiple viewsheds in a row.
73
85
  *
86
+ * By default, the observer is created at absolute height.
87
+ * Optionally, by specifying the options of the method,
88
+ * you can change the [elevation info](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/).
89
+ *
74
90
  * Calling this method sets [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#interactive) to `true`.
75
91
  *
76
- * @param options - An object specifying additional options.
92
+ * @param options - An object specifying additional placement options, including elevation information and an abort signal.
77
93
  * @returns A promise which resolves when creation is completed successfully or rejected if it is
78
94
  * canceled.
79
95
  * @example
80
96
  * const abortController = new AbortController();
81
97
  *
82
98
  * try {
83
- * await viewshedAnalysisView.createViewsheds({ signal: abortController.signal });
99
+ * await analysisView.createViewsheds({
100
+ * signal: abortController.signal,
101
+ * // optional elevation info
102
+ * elevationInfo: { mode: "relative-to-ground", offset: 1.5 },
103
+ * });
84
104
  * } catch (error) {
85
105
  * if (error.name === "AbortError") {
86
106
  * console.log("Creation operation was cancelled.");
87
107
  * }
88
108
  * }
89
109
  *
90
- * // cancel the placement operation at some later point
110
+ * // cancel the creation operation at some later point
91
111
  * abortController.abort();
92
112
  */
93
113
  createViewsheds(options?: ViewshedPlacementOptions | null | undefined): Promise<void>;
94
114
  /**
95
115
  * Starts the interactive placement of a single viewshed, adding it to the [analysis](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#analysis).
96
116
  *
97
- * The first click in the scene places the observer point and the second sets the viewshed's orientation.
117
+ * The first click in the scene places the observer point and the second sets the viewshed's orientation and distance.
98
118
  *
99
119
  * The placement operation will finish when the user presses the escape key.
100
120
  * To stop the placing programmatically, pass an abort signal as an argument when calling the method.
101
121
  *
122
+ * By default, the observer is created at absolute height.
123
+ * Optionally, by specifying the options of the method,
124
+ * you can change the [elevation info](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/).
125
+ *
102
126
  * Calling this method sets [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ViewshedAnalysisView3D/#interactive) to `true`.
103
127
  *
104
128
  * @param options - An object specifying additional options.
@@ -109,7 +133,11 @@ export default abstract class ViewshedAnalysisView3D extends AnalysisView3D {
109
133
  * const abortController = new AbortController();
110
134
  *
111
135
  * try {
112
- * await analysisView.place({ signal: abortController.signal });
136
+ * await analysisView.place({
137
+ * signal: abortController.signal,
138
+ * // optional elevation info
139
+ * elevationInfo: { mode: "relative-to-ground", offset: 1.5 },
140
+ * });
113
141
  * } catch (error) {
114
142
  * if (error.name === "AbortError") {
115
143
  * console.log("Placement operation was cancelled.");
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{GamepadKeyboardController as e}from"../../state/controllers/GamepadKeyboardController.js";import{InputHandler as t}from"../../../input/InputHandler.js";import{onVisibilityChange as n}from"../../../input/VisibilityChange.js";class r extends t{constructor(e,t){super(!0),this._view=e,this._keyToDirection=new Map,this._keyToAction=new Map,this._precisionPanModifierKeys=new Set,this._coarsePanModifierKeys=new Set,this._stickyKeyTimeoutHandle=void 0,this._stickyKeyDuration=200,this._addKeysMapping(t),this.registerIncoming(`key-down`,null,e=>this._handleKeyDown(e)),this.registerIncoming(`key-up`,null,e=>this._handleKeyUp(e)),this.registerIncoming(`blur`,null,()=>this._handleStop()),this._visibilityHandle=n(e=>e?null:this._handleStop())}onUninstall(){this._visibilityHandle?.remove(),this._handleStop()}setStickyKeyDuration(e){this._stickyKeyDuration=e}_addKeysMapping(e){this._addKeyMapping(e.pan.left,0),this._addKeyMapping(e.pan.right,1),this._addKeyMapping(e.pan.forward,2),this._addKeyMapping(e.pan.backward,3),this._addKeyMapping(e.pan.up,4),this._addKeyMapping(e.pan.down,5),this._addKeyMapping(e.lookAround.headingLeft,6),this._addKeyMapping(e.lookAround.headingRight,7),this._addKeyMapping(e.lookAround.tiltUp,8),this._addKeyMapping(e.lookAround.tiltDown,9),this._addKeyMapping(e.zoom.zoomIn,10),this._addKeyMapping(e.zoom.zoomOut,11),this._addKeyAction(e.reset.heading,()=>this._resetHeading()),this._addKeyAction(e.reset.tilt,()=>this._resetTilt());for(let t of this._eachKey(e.precisionPanModifier))this._precisionPanModifierKeys.add(t);for(let t of this._eachKey(e.coarsePanModifier))this._coarsePanModifierKeys.add(t)}_addKeyMapping(e,t){for(let n of this._eachKey(e))this._keyToDirection.set(n,t)}*_eachKey(e){typeof e==`string`?yield e:yield*e}_addKeyAction(e,t){for(let n of this._eachKey(e))this._keyToAction.set(n,t)}_handleKeyDown(t){if(t.data.native.ctrlKey||t.data.native.metaKey)return;let n=this._keyToAction.get(t.data.key);if(n!=null){t.stopPropagation(),n();return}let r=this._keyToDirection.get(t.data.key);if(r==null)this._cameraControllerKeyboard?.running&&this._updatePanModifiers(t);else if((!this._cameraControllerKeyboard||!this._cameraControllerKeyboard.running)&&(this._cameraControllerKeyboard=new e({view:this._view}),this._view.state.switchCameraController(this._cameraControllerKeyboard)),this._updatePanModifiers(t),this._cameraControllerKeyboard.running){if(t.stopPropagation(),this._cameraControllerKeyboard.directionActive(r)||(this._cameraControllerKeyboard.activateDirection(r),this._cameraControllerKeyboard.countActiveDirections()>1||!this._isPanning(r)))return;this._stickyKeyDuration>0&&(this._stickyKeyTimeoutHandle=setTimeout(()=>{this._stickyKeyTimeoutHandle=void 0,this._stickyDirection!=null&&this._stickyDirection!==void 0&&(this._cameraControllerKeyboard?.deactivateDirection(this._stickyDirection),this._stickyDirection=void 0)},this._stickyKeyDuration))}}_handleStop(){this._cameraControllerKeyboard?.running&&(this._cameraControllerKeyboard.finishController(),this._cameraControllerKeyboard=null)}_handleKeyUp(e){if(e.data.native.ctrlKey||e.data.native.metaKey||!this._cameraControllerKeyboard?.running)return;this._updatePanModifiers(e);let t=this._keyToDirection.get(e.data.key);if(t==null)return;e.stopPropagation();let n=this._stickyKeyTimeoutHandle===void 0;this._stickyKeyTimeoutHandle!==void 0&&this._cameraControllerKeyboard?.countActiveDirections()===1?this._stickyDirection=t:(this._cameraControllerKeyboard?.deactivateDirection(t),n&&(this._stickyDirection=void 0))}_isPanning(e){return e<=3}_updatePanModifiers(e){this._cameraControllerKeyboard?.setPrecisionPanEnabled(this._eventMatchesKeys(e,this._precisionPanModifierKeys)),this._cameraControllerKeyboard?.setCoarsePanEnabled(this._eventMatchesKeys(e,this._coarsePanModifierKeys))}_eventMatchesKeys(e,t){return e.type===`key-down`&&t.has(e.data.key)||t.values().some(t=>e.modifiers.has(t))}_resetHeading(){this._view.goTo({heading:0}).catch(()=>{})}_resetTilt(){this._view.goTo({tilt:0}).catch(()=>{})}}export{r as KeyboardNavigation};
2
+ import{GamepadKeyboardController as e}from"../../state/controllers/GamepadKeyboardController.js";import{InputHandler as t}from"../../../input/InputHandler.js";import{onVisibilityChange as n}from"../../../input/VisibilityChange.js";class r extends t{constructor(e,t){super(!0),this._view=e,this._keyToDirection=new Map,this._keyToAction=new Map,this._precisionPanModifierKeys=new Set,this._coarsePanModifierKeys=new Set,this._stickyKeyTimeoutHandle=void 0,this._stickyKeyDuration=200,this._addKeysMapping(t),this.registerIncoming(`key-down`,null,e=>this._handleKeyDown(e)),this.registerIncoming(`key-up`,null,e=>this._handleKeyUp(e)),this.registerIncoming(`blur`,null,()=>this._handleStop()),this._visibilityHandle=n(e=>e?null:this._handleStop())}onUninstall(){this._visibilityHandle?.remove(),this._handleStop()}setStickyKeyDuration(e){this._stickyKeyDuration=e}_addKeysMapping(e){this._addKeyMapping(e.pan.left,0),this._addKeyMapping(e.pan.right,1),this._addKeyMapping(e.pan.forward,2),this._addKeyMapping(e.pan.backward,3),this._addKeyMapping(e.pan.up,4),this._addKeyMapping(e.pan.down,5),this._addKeyMapping(e.lookAround.headingLeft,6),this._addKeyMapping(e.lookAround.headingRight,7),this._addKeyMapping(e.lookAround.tiltUp,8),this._addKeyMapping(e.lookAround.tiltDown,9),this._addKeyMapping(e.zoom.zoomIn,10),this._addKeyMapping(e.zoom.zoomOut,11),this._addKeyAction(e.reset.heading,()=>this._resetHeading()),this._addKeyAction(e.reset.tilt,()=>this._resetTilt());for(let t of this._eachKey(e.precisionPanModifier))this._precisionPanModifierKeys.add(t);for(let t of this._eachKey(e.coarsePanModifier))this._coarsePanModifierKeys.add(t)}_addKeyMapping(e,t){for(let n of this._eachKey(e))this._keyToDirection.set(n,t)}*_eachKey(e){typeof e==`string`?yield e:yield*e}_addKeyAction(e,t){for(let n of this._eachKey(e))this._keyToAction.set(n,t)}_handleKeyDown(t){if(t.data.native.ctrlKey||t.data.native.metaKey)return;let n=this._keyToAction.get(t.data.key);if(n!=null){t.stopPropagation(),n();return}let r=this._keyToDirection.get(t.data.key);if(r==null)this._cameraControllerKeyboard?.running&&this._updatePanModifiers(t);else if(this._cameraControllerKeyboard&&this._cameraControllerKeyboard.running||(this._cameraControllerKeyboard=new e({view:this._view}),this._view.state.switchCameraController(this._cameraControllerKeyboard)),this._updatePanModifiers(t),this._cameraControllerKeyboard.running){if(t.stopPropagation(),this._cameraControllerKeyboard.directionActive(r)||(this._cameraControllerKeyboard.activateDirection(r),this._cameraControllerKeyboard.countActiveDirections()>1||!this._isPanning(r)))return;this._stickyKeyDuration>0&&(this._stickyKeyTimeoutHandle=setTimeout(()=>{this._stickyKeyTimeoutHandle=void 0,this._stickyDirection!=null&&this._stickyDirection!==void 0&&(this._cameraControllerKeyboard?.deactivateDirection(this._stickyDirection),this._stickyDirection=void 0)},this._stickyKeyDuration))}}_handleStop(){this._cameraControllerKeyboard?.running&&(this._cameraControllerKeyboard.finishController(),this._cameraControllerKeyboard=null)}_handleKeyUp(e){if(e.data.native.ctrlKey||e.data.native.metaKey||!this._cameraControllerKeyboard?.running)return;this._updatePanModifiers(e);let t=this._keyToDirection.get(e.data.key);if(t==null)return;e.stopPropagation();let n=this._stickyKeyTimeoutHandle===void 0;this._stickyKeyTimeoutHandle!==void 0&&this._cameraControllerKeyboard?.countActiveDirections()===1?this._stickyDirection=t:(this._cameraControllerKeyboard?.deactivateDirection(t),n&&(this._stickyDirection=void 0))}_isPanning(e){return e<=3}_updatePanModifiers(e){this._cameraControllerKeyboard?.setPrecisionPanEnabled(this._eventMatchesKeys(e,this._precisionPanModifierKeys)),this._cameraControllerKeyboard?.setCoarsePanEnabled(this._eventMatchesKeys(e,this._coarsePanModifierKeys))}_eventMatchesKeys(e,t){return e.type===`key-down`&&t.has(e.data.key)||t.values().some(t=>e.modifiers.has(t))}_resetHeading(){this._view.goTo({heading:0}).catch(()=>{})}_resetTilt(){this._view.goTo({tilt:0}).catch(()=>{})}}export{r as KeyboardNavigation};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{handlesGroup as t,makeHandle as n}from"../../../../../core/handleUtils.js";import{destroyMaybe as r,removeMaybe as i}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as o,initial as s,when as c}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{set as d}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as p,getEffectiveElevationMode as m}from"../../../../../support/elevationInfoUtils.js";import h from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as g}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as _}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as v}from"../meshFastUpdateUtils.js";import{Settings as y}from"../settings.js";import{ExtendedLineVisualElement as b}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as x}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as S}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as C}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as w}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as T}from"../../../layers/graphics/GraphicState.js";import{DrawGraphicTool as E,geometryTypeToDrawOperationGeometryType as D}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as O}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as k,SceneDrawSurface as A}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as j}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as M}from"../../../../../core/accessorSupport/trackingUtils.js";let N=class extends E{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new y({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type=`draw-3d`}initialize(){let{mode:e,offset:t,unit:n,featureExpressionInfo:r}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new h({mode:e,offset:t,unit:n,featureExpressionInfo:r})}normalizeCtorArgs(e){if(!e.elevationInfo){let t=e.hasZ??!0;return{...e,elevationInfo:p(t)}}return e}initializeGraphic(e){let{view:n}=this,r=this._createGraphicState=new T({graphic:e});return t([n.maskOccludee(e),n.trackGraphicState(r),a(()=>({element:this._outlineVisualElement,isDraped:r.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},o),M(()=>{j(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(r),...v(r)])}makeDrawOperation(){let{geometryType:e}=this,t=e!==`circle`&&e!==`rectangle`;return new O({view:this.view,manipulators:this.manipulators,geometryType:D(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new A(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new k(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new _,segmentLabels:t?new g:null,labelOptions:this.toolOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:m(this.hasZ,this.elevationInfo)===`on-the-ground`,cursor:this.cursor,constraintsEnabled:!0})}onActiveVertexChanged(e){let{view:i}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),n();let a=this._settings,o=a.manipulators.vertex,c=new S({view:i,spatialReference:i.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:o.size,outlineSize:o.outlineSize,renderOccluded:o.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=c;let l=a.visualElements.zVerticalLine,u=new b({view:i,extensionType:l.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._verticalLineVisualElement=u;let d=t([this._updatingHandles.add(()=>a.visualElements.zVerticalLine,e=>e.apply(u),s),this._updatingHandles.add(()=>({selectedColor:a.colors.selected.toUnitRGBA(),outlineColor:a.manipulators.vertex.outlineColor.toUnitRGBA()}),({selectedColor:e,outlineColor:t})=>{c.color=e,c.outlineColor=t},s),n(()=>{this._activeVertexVisualElement=r(this._activeVertexVisualElement),this._verticalLineVisualElement=r(this._verticalLineVisualElement)})]);return c.attached=!0,this._updateVerticalLineVisualElement(e),d}_updateVerticalLineVisualElement(e){let t=this._verticalLineVisualElement;if(!t)return;let{renderCoordsHelper:n,elevationProvider:r}=this.view;d(F,e[0],e[1],e[2]),P.setFromElevationInfo(this.elevationInfo),F[2]=C(F,r,P,n),n.toRenderCoords(F,this.view.spatialReference,F)?(t.setStartEndFromWorldDownAtLocation(F),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,n();let i=this.internalGraphicsLayer.elevationInfo,{view:a}=this,o=this._settings,c=new x({view:a,geometry:e,elevationInfo:i,isDraped:this._createGraphicState?this._createGraphicState.isDraped:m(this.hasZ,i)===`on-the-ground`,attached:!1,isDecoration:!0});this._outlineVisualElement=c;let l=t([this._updatingHandles.add(()=>o.visualElements.lineObjects.outline,e=>e.apply(c),s),this._updatingHandles.add(()=>o.visualElements.lineObjects.shadowStyle,e=>e.apply(c),s),n(()=>{this._outlineVisualElement=r(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,l}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,n();let{view:i}=this,a=this._settings,o=a.manipulators.vertex,c=new S({view:i,spatialReference:i.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:o.size,outlineSize:o.outlineSize,renderOccluded:o.renderOccluded,attached:!1,isDecoration:!0}),l=t([this._updatingHandles.add(()=>({color:a.manipulators.vertex.color.toUnitRGBA(),outlineColor:a.manipulators.vertex.outlineColor.toUnitRGBA()}),({color:e,outlineColor:t})=>{c.color=e,c.outlineColor=t},s),n(()=>{this._verticesVisualElement=r(this._verticesVisualElement)})]);return c.attached=!0,this._verticesVisualElement=c,l}updateGraphicGeometry(e){if(this.geometryType===`mesh`&&e?.type===`point`){let t=this.geometryToPlace;t?.centerAt(e),j(this.tooltipInfos.mesh,t);let n=this._graphic;(!t||n.geometry!==t)&&(n.geometry=t)}else super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){let{drawOperation:r}=this;if(!this.geometryToPlace||e.displaying)return r.loading=!1,null;r.loading=!0;let a=n(()=>{r.loading=!1}),s,l=()=>{s&&cancelAnimationFrame(s)},u=()=>{l(),s=requestAnimationFrame(()=>a.remove())},d=null;return d=e.on(`changed`,()=>{d=i(d),u()}),t([d,c(()=>e.displaying,u,{...o,once:!0}),n(l),a])}};e([l({constructOnly:!0})],N.prototype,`elevationInfo`,void 0),e([l({constructOnly:!0})],N.prototype,`geometryType`,void 0),e([l()],N.prototype,`type`,void 0),e([l({constructOnly:!0})],N.prototype,`view`,void 0),N=e([u(`esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D`)],N);const P=new w,F=f();export{N as DrawGraphicTool3D};
2
+ import{__decorate as e}from"tslib";import{handlesGroup as t,makeHandle as n}from"../../../../../core/handleUtils.js";import{destroyMaybe as r,removeMaybe as i}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as o,initial as s,when as c}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{set as d}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as p,getEffectiveElevationMode as m}from"../../../../../support/elevationInfoUtils.js";import h from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as g}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as _}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as v}from"../meshFastUpdateUtils.js";import{Settings as y}from"../settings.js";import{ExtendedLineVisualElement as b}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as x}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as S}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as C}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as w}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as T}from"../../../layers/graphics/GraphicState.js";import{DrawGraphicTool as E,geometryTypeToDrawOperationGeometryType as D}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as O}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as k,SceneDrawSurface as A}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as j}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as M}from"../../../../../core/accessorSupport/trackingUtils.js";let N=class extends E{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new y({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type=`draw-3d`}initialize(){let{mode:e,offset:t,unit:n,featureExpressionInfo:r}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new h({mode:e,offset:t,unit:n,featureExpressionInfo:r})}normalizeCtorArgs(e){if(!e.elevationInfo){let t=e.hasZ??!0;return{...e,elevationInfo:p(t)}}return e}initializeGraphic(e){let{view:n}=this,r=this._createGraphicState=new T({graphic:e});return t([n.maskOccludee(e),n.trackGraphicState(r),a(()=>({element:this._outlineVisualElement,isDraped:r.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},o),M(()=>{j(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(r),...v(r)])}makeDrawOperation(){let{geometryType:e}=this,t=e!==`circle`&&e!==`rectangle`;return new O({view:this.view,manipulators:this.manipulators,geometryType:D(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new A(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new k(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new _,segmentLabels:t?new g:null,labelOptions:this.toolOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:m(this.hasZ,this.elevationInfo)===`on-the-ground`,cursor:this.cursor,constraintsEnabled:!0})}onActiveVertexChanged(e){let{view:i}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),n();let a=this._settings,o=a.manipulators.vertex,c=new S({view:i,spatialReference:i.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:o.size,outlineSize:o.outlineSize,renderOccluded:o.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=c;let l=a.visualElements.zVerticalLine,u=new b({view:i,extensionType:l.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._verticalLineVisualElement=u;let d=t([this._updatingHandles.add(()=>a.visualElements.zVerticalLine,e=>e.apply(u),s),this._updatingHandles.add(()=>({selectedColor:a.colors.selected.toUnitRGBA(),outlineColor:a.manipulators.vertex.outlineColor.toUnitRGBA()}),({selectedColor:e,outlineColor:t})=>{c.color=e,c.outlineColor=t},s),n(()=>{this._activeVertexVisualElement=r(this._activeVertexVisualElement),this._verticalLineVisualElement=r(this._verticalLineVisualElement)})]);return c.attached=!0,this._updateVerticalLineVisualElement(e),d}_updateVerticalLineVisualElement(e){let t=this._verticalLineVisualElement;if(!t)return;let{renderCoordsHelper:n,elevationProvider:r}=this.view;d(F,e[0],e[1],e[2]),P.setFromElevationInfo(this.elevationInfo),F[2]=C(F,r,P,n),n.toRenderCoords(F,this.view.spatialReference,F)?(t.setStartEndFromWorldDownAtLocation(F),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,n();let i=this.internalGraphicsLayer.elevationInfo,{view:a}=this,o=this._settings,c=new x({view:a,geometry:e,elevationInfo:i,isDraped:this._createGraphicState?this._createGraphicState.isDraped:m(this.hasZ,i)===`on-the-ground`,attached:!1,isDecoration:!0});this._outlineVisualElement=c;let l=t([this._updatingHandles.add(()=>o.visualElements.lineObjects.outline,e=>e.apply(c),s),this._updatingHandles.add(()=>o.visualElements.lineObjects.shadowStyle,e=>e.apply(c),s),n(()=>{this._outlineVisualElement=r(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,l}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,n();let{view:i}=this,a=this._settings,o=a.manipulators.vertex,c=new S({view:i,spatialReference:i.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:o.size,outlineSize:o.outlineSize,renderOccluded:o.renderOccluded,attached:!1,isDecoration:!0}),l=t([this._updatingHandles.add(()=>({color:a.manipulators.vertex.color.toUnitRGBA(),outlineColor:a.manipulators.vertex.outlineColor.toUnitRGBA()}),({color:e,outlineColor:t})=>{c.color=e,c.outlineColor=t},s),n(()=>{this._verticesVisualElement=r(this._verticesVisualElement)})]);return c.attached=!0,this._verticesVisualElement=c,l}updateGraphicGeometry(e){if(this.geometryType===`mesh`&&e?.type===`point`){let t=this.geometryToPlace;t?.centerAt(e),j(this.tooltipInfos.mesh,t);let n=this._graphic;t&&n.geometry===t||(n.geometry=t)}else super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){let{drawOperation:r}=this;if(!this.geometryToPlace||e.displaying)return r.loading=!1,null;r.loading=!0;let a=n(()=>{r.loading=!1}),s,l=()=>{s&&cancelAnimationFrame(s)},u=()=>{l(),s=requestAnimationFrame(()=>a.remove())},d=null;return d=e.on(`changed`,()=>{d=i(d),u()}),t([d,c(()=>e.displaying,u,{...o,once:!0}),n(l),a])}};e([l({constructOnly:!0})],N.prototype,`elevationInfo`,void 0),e([l({constructOnly:!0})],N.prototype,`geometryType`,void 0),e([l()],N.prototype,`type`,void 0),e([l({constructOnly:!0})],N.prototype,`view`,void 0),N=e([u(`esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D`)],N);const P=new w,F=f();export{N as DrawGraphicTool3D};