@arcgis/core 5.0.0-next.63 → 5.0.0-next.64
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.
- package/Ground.d.ts +2 -1
- package/Ground.js +1 -1
- package/WebDocument2D.js +1 -1
- package/WebLinkChart.js +1 -1
- package/WebMap.d.ts +1 -1
- package/WebMap.js +1 -1
- package/WebScene.d.ts +1 -1
- package/WebScene.js +1 -1
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +18 -0
- package/applications/KnowledgeStudio/dataModelVisualization.js +5 -0
- package/applications/MapViewer/templateUtils.d.ts +2 -2
- package/applications/Urban/LineImagePattern3D.d.ts +8 -0
- package/applications/Urban/LineImagePattern3D.js +5 -0
- package/applications/Urban/imagePatternUtils.d.ts +23 -0
- package/applications/Urban/imagePatternUtils.js +5 -0
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{61707c22b029c2a7a397.js → 049c125085028ffdd0dd.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bd73a66baea2f52e8a6.js → 07639f406b71bb49ffd6.js} +1 -1
- package/assets/esri/core/workers/chunks/{df0e5570174bf0942d7a.js → 0d9e1ccc3ba8b5ed3287.js} +1 -1
- package/assets/esri/core/workers/chunks/{4404b6f931f681cca342.js → 0e5cd0cf6ab7cb37d723.js} +1 -1
- package/assets/esri/core/workers/chunks/{a624dd283d264dce35a8.js → 0f5693541111fcae0c2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{f56906c443ce8ff68a27.js → 13d61d34e55c80e4ecdf.js} +1 -1
- package/assets/esri/core/workers/chunks/{28b235b56a83c498d73f.js → 168ec8fca2702617a543.js} +1 -1
- package/assets/esri/core/workers/chunks/{831b8282380844a7c4d5.js → 1967239713b58dccfd81.js} +1 -1
- package/assets/esri/core/workers/chunks/1b838638e66e82d76cf3.js +1 -0
- package/assets/esri/core/workers/chunks/{2209550b6510e25da375.js → 226acd251ad7d7ee3b57.js} +1 -1
- package/assets/esri/core/workers/chunks/22dd5cecc7e2d4d0baf8.js +316 -0
- package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +1 -0
- package/assets/esri/core/workers/chunks/{893a5ab0c2df9262efd8.js → 251eb6e00f99a816d55c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e47535f795b15608a6cb.js → 27f096c434f049b8df01.js} +1 -1
- package/assets/esri/core/workers/chunks/29b09db309ff75fb3e97.js +1 -0
- package/assets/esri/core/workers/chunks/{bef2a70d382515b3c84e.js → 310f3268582e61cd86da.js} +1 -1
- package/assets/esri/core/workers/chunks/{02cf735176f286a48dd2.js → 3371935a4fd6346d3a17.js} +1 -1
- package/assets/esri/core/workers/chunks/{36d15c35fbbd4dedd5cb.js → 3c3d311b88f5400951ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf3a9ead26629f3508b3.js → 3c4f8597f602779174f1.js} +1 -1
- package/assets/esri/core/workers/chunks/43d28c6509c21b8917a8.js +1 -0
- package/assets/esri/core/workers/chunks/{951e3c911a3486b1e609.js → 45b898367b6224dda46f.js} +1 -1
- package/assets/esri/core/workers/chunks/{57302b92e9899cce4ba3.js → 4785cd108e2dec6e1697.js} +1 -1
- package/assets/esri/core/workers/chunks/{153ff2ceefccd946498b.js → 47bfe8dd5d2bac4307ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{2abc205f81f26fc4852b.js → 49a1b7f700b8a42de817.js} +4 -4
- package/assets/esri/core/workers/chunks/4d6d962d25aa836f53ee.js +1 -0
- package/assets/esri/core/workers/chunks/{454c15367cccbf63af7a.js → 4e9a8fce55cad841c731.js} +1 -1
- package/assets/esri/core/workers/chunks/{b93f2bd6429879f92143.js → 536c492fdda30f2f1288.js} +1 -1
- package/assets/esri/core/workers/chunks/5cee6c3ff23fb93f857a.js +1 -0
- package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +1 -0
- package/assets/esri/core/workers/chunks/62b28f73f814413c10fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0bc01d71ed1ab8c3af3c.js → 6599cc702a46f81a5634.js} +1 -1
- package/assets/esri/core/workers/chunks/6925f09d44cc38480d53.js +1 -0
- package/assets/esri/core/workers/chunks/{72e3a48aa365542b0689.js → 6a782e8475bff4d56dbc.js} +1 -1
- package/assets/esri/core/workers/chunks/6ba3c2b9f699d94d62b8.js +1 -0
- package/assets/esri/core/workers/chunks/{f44f358db5c56d5bbc0c.js → 7306b5b66e738a281d83.js} +1 -1
- package/assets/esri/core/workers/chunks/{2da13c2269ab90281143.js → 7694abe44d55dae8872d.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b34a010f76e5f289868.js → 7bf491b468cd74a4166c.js} +1 -1
- package/assets/esri/core/workers/chunks/{05ab54b81c366e98138f.js → 7d8664aeff66e34138bd.js} +1 -1
- package/assets/esri/core/workers/chunks/822ef6a043c7e147b4b6.js +1 -0
- package/assets/esri/core/workers/chunks/878010ca23da0bca9405.js +1 -0
- package/assets/esri/core/workers/chunks/892157696e8f9e38c472.js +1 -0
- package/assets/esri/core/workers/chunks/{d2abfcb0c8bf894c7f72.js → 8dca61f8ba6689379f86.js} +1 -1
- package/assets/esri/core/workers/chunks/{bce81df760f5e34c01d7.js → 964de713042f52d71e42.js} +1 -1
- package/assets/esri/core/workers/chunks/990341f7c47bd656c782.js +1 -0
- package/assets/esri/core/workers/chunks/9d6945cda99d14af83ac.js +1 -0
- package/assets/esri/core/workers/chunks/{5180b15f1a865756a02e.js → a3836f6a93924ee4816e.js} +1 -1
- package/assets/esri/core/workers/chunks/{d13b2ce8a89938b0472b.js → a6dcd13c792b6538ac50.js} +1 -1
- package/assets/esri/core/workers/chunks/{522a6787d9e0f520ac79.js → a893f8db2477cf677ac8.js} +1 -1
- package/assets/esri/core/workers/chunks/{983356eb4fd0a0dcf3fd.js → abc236e99b52be1c83b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{b11c0e80e583f2b7c5de.js → ac83c2999a3d2ffb4356.js} +1 -1
- package/assets/esri/core/workers/chunks/{5873c7b65d0fb04998fb.js → acea42d268b53ceb2bfd.js} +1 -1
- package/assets/esri/core/workers/chunks/{8628bf45a33af786cd49.js → b65fcfde62d49de1fa54.js} +1 -1
- package/assets/esri/core/workers/chunks/ba7f57788847cc0f68df.js +1 -0
- package/assets/esri/core/workers/chunks/{12f700b932a241e59071.js → bcf612eabe7577540953.js} +1 -1
- package/assets/esri/core/workers/chunks/{75e9759290f0f67b2128.js → bf06250be7a7a36306b1.js} +1 -1
- package/assets/esri/core/workers/chunks/c3007b916ba933137709.js +1 -0
- package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +1 -0
- package/assets/esri/core/workers/chunks/cc5c1887e6d7079e5fe3.js +1 -0
- package/assets/esri/core/workers/chunks/ce8f075c814a8378c00c.js +1 -0
- package/assets/esri/core/workers/chunks/{f91e63d7842c427c7f72.js → d30cfc5fa302cc08d862.js} +1 -1
- package/assets/esri/core/workers/chunks/d3325ed8d224e2350db7.js +1 -0
- package/assets/esri/core/workers/chunks/{1800994523d7cdfb73af.js → de71db3b0fb947b13c97.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff7df6fb78fa2c0e9247.js → df92239eefff04471a0b.js} +1 -1
- package/assets/esri/core/workers/chunks/e69255e38ff200dda14b.js +1 -0
- package/assets/esri/core/workers/chunks/ee2ca25048a920e43743.js +1 -0
- package/assets/esri/core/workers/chunks/{609919428305d8c8c243.js → f9370830051865a3435b.js} +1 -1
- package/assets/esri/core/workers/chunks/fc00d7278b43df813c54.js +1 -0
- package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +7 -18
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/RibbonLine.glsl.js +99 -61
- package/chunks/libtess-f32.js +5 -0
- package/chunks/libtess-f64.js +5 -0
- package/config.js +1 -1
- package/core/Version.d.ts +1 -1
- package/core/Version.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/registry.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/form/elements/inputs/SwitchInput.d.ts +2 -1
- package/geometry/Mesh.d.ts +2 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/support/MeshVertexAttributes.d.ts +1 -1
- package/geometry/support/MeshVertexAttributes.js +1 -1
- package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/ground/NavigationConstraint.d.ts +1 -1
- package/ground/NavigationConstraint.js +1 -1
- package/interfaces.d.ts +163 -158
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.d.ts +1 -1
- package/layers/ElevationLayer.d.ts +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +1 -5
- package/layers/Layer.d.ts +1 -2
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/knowledgeGraph/dataModelVisualizationUtils.d.ts +11 -0
- package/layers/knowledgeGraph/dataModelVisualizationUtils.js +5 -0
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/mixins/BlendLayer.d.ts +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/functions/ColormapToRGBFunction.js +1 -1
- package/layers/raster/functions/surfaceUtils.js +1 -1
- package/layers/support/CodedValue.d.ts +1 -1
- package/layers/support/CodedValue.js +1 -1
- package/layers/support/CodedValueDomain.d.ts +2 -1
- package/layers/support/CodedValueDomain.js +1 -1
- package/layers/support/ElevationTileData.d.ts +1 -1
- package/layers/support/ElevationTileData.js +1 -1
- package/layers/support/FeatureReduction.d.ts +1 -1
- package/layers/support/FeatureReduction.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +1 -1
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionSelection.d.ts +1 -1
- package/layers/support/FeatureReductionSelection.js +1 -1
- package/layers/support/KMLMapImage.d.ts +1 -1
- package/layers/support/KMLMapImage.js +1 -1
- package/layers/support/ParquetGeometryEncodingBase.d.ts +1 -1
- package/layers/support/ParquetGeometryEncodingBase.js +1 -1
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +1 -1
- package/layers/support/ParquetGeometryEncodingLocation.js +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.js +1 -1
- package/layers/support/PixelBlock.d.ts +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/SimpleBandStatistics.d.ts +1 -1
- package/layers/support/SimpleBandStatistics.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/source/DataLayerSource.d.ts +6 -3
- package/layers/support/source/DataLayerSource.js +1 -1
- package/layers/support/source/MapLayerSource.d.ts +1 -1
- package/layers/support/source/MapLayerSource.js +1 -1
- package/layers/support/source/QueryTableDataSource.d.ts +1 -1
- package/layers/support/source/QueryTableDataSource.js +1 -1
- package/layers/support/source/RasterDataSource.d.ts +1 -1
- package/layers/support/source/RasterDataSource.js +1 -1
- package/layers/support/source/TableDataSource.d.ts +1 -1
- package/layers/support/source/TableDataSource.js +1 -1
- package/layers/support/source/types.d.ts +1 -1
- package/layers/types.d.ts +7 -1
- package/package.json +1 -1
- package/popup/content/MediaContent.d.ts +2 -2
- package/popup/content/types.d.ts +9 -0
- package/portal/Portal.d.ts +3 -3
- package/portal/PortalGroup.d.ts +1 -1
- package/portal/PortalItem.d.ts +2 -2
- package/portal/PortalItemResource.d.ts +1 -1
- package/portal/PortalQueryParams.d.ts +1 -1
- package/portal/PortalUser.d.ts +5 -5
- package/portal/schemas/definitions.js +1 -1
- package/portal/support/resourceUtils.d.ts +1 -1
- package/renderers/HeatmapRenderer.d.ts +2 -1
- package/renderers/HeatmapRenderer.js +1 -1
- package/renderers/PieChartRenderer.d.ts +2 -1
- package/renderers/PieChartRenderer.js +1 -1
- package/renderers/support/AuthoringInfo.d.ts +2 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/AuthoringInfoClassBreakInfo.d.ts +1 -1
- package/renderers/support/AuthoringInfoClassBreakInfo.js +1 -1
- package/renderers/support/AuthoringInfoFieldInfo.d.ts +3 -2
- package/renderers/support/AuthoringInfoFieldInfo.js +1 -1
- package/renderers/support/DictionaryScriptEvaluator.js +1 -1
- package/renderers/support/HeatmapLegendOptions.d.ts +1 -1
- package/renderers/support/HeatmapLegendOptions.js +1 -1
- package/renderers/support/OthersCategory.d.ts +1 -1
- package/renderers/support/OthersCategory.js +1 -1
- package/rest/featureService/types.d.ts +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
- package/rest/support/ArealUnit.d.ts +1 -1
- package/rest/support/BaseImageMeasureResultValue.d.ts +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +1 -1
- package/rest/support/BufferParameters.d.ts +1 -1
- package/rest/support/ClosestFacilityParameters.d.ts +1 -1
- package/rest/support/DataLayer.d.ts +1 -1
- package/rest/support/DensifyParameters.d.ts +1 -1
- package/rest/support/DirectionLine.d.ts +1 -1
- package/rest/support/DirectionPoint.d.ts +1 -1
- package/rest/support/DirectionsString.d.ts +1 -1
- package/rest/support/DistanceParameters.d.ts +1 -1
- package/rest/support/GPMessage.d.ts +1 -1
- package/rest/support/ImageAreaParameters.d.ts +1 -1
- package/rest/support/ImageAreaResult.d.ts +4 -2
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.d.ts +4 -2
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.d.ts +2 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.d.ts +3 -2
- package/rest/support/ImageMeasureResultAngleValue.js +1 -1
- package/rest/support/ImageMeasureResultAreaValue.d.ts +3 -2
- package/rest/support/ImageMeasureResultAreaValue.js +1 -1
- package/rest/support/ImageMeasureResultLengthValue.d.ts +4 -3
- package/rest/support/ImageMeasureResultLengthValue.js +1 -1
- package/rest/support/JobInfo.d.ts +1 -1
- package/rest/support/LinearUnit.d.ts +1 -1
- package/rest/support/LocateSetting.d.ts +1 -1
- package/rest/support/NAMessage.d.ts +1 -1
- package/rest/support/NetworkAttribute.d.ts +1 -1
- package/rest/support/OffsetParameters.d.ts +1 -1
- package/rest/support/PointBarrier.d.ts +1 -1
- package/rest/support/PolygonBarrier.d.ts +1 -1
- package/rest/support/PolylineBarrier.d.ts +1 -1
- package/rest/support/RouteParameters.d.ts +1 -1
- package/rest/support/ServiceAreaParameters.d.ts +1 -1
- package/rest/support/Stop.d.ts +1 -1
- package/rest/support/TravelMode.d.ts +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/renderers/relationship.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/support/tests/meshUtils.js +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +2 -1
- package/symbols/ExtrudeSymbol3DLayer.js +1 -1
- package/symbols/FillSymbol3DLayer.d.ts +4 -2
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.d.ts +23 -4
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +2 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/symbols/ObjectSymbol3DLayer.d.ts +6 -3
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/PathSymbol3DLayer.d.ts +2 -1
- package/symbols/PathSymbol3DLayer.js +1 -1
- package/symbols/TextSymbol3DLayer.d.ts +21 -3
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/patterns/LinePattern3D.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
- package/symbols/support/OccludedVisibility.d.ts +27 -0
- package/symbols/support/Symbol3DAnchorPosition2D.d.ts +1 -1
- package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.d.ts +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.d.ts +3 -2
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DHalo.d.ts +1 -1
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/Symbol3DIconOutline.d.ts +1 -1
- package/symbols/support/Symbol3DIconOutline.js +1 -1
- package/symbols/support/Symbol3DMaterial.d.ts +1 -1
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/Symbol3DOutline.d.ts +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/Symbol3DTextBackground.d.ts +1 -1
- package/symbols/support/Symbol3DTextBackground.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/primitives.js +5 -0
- package/symbols/support/types.d.ts +2 -0
- package/symbols/support/utils.js +1 -1
- package/views/2d/analysis/AnalysisView2D.d.ts +2 -2
- package/views/2d/analysis/AnalysisView2D.js +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +1 -1
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/ClipMesh.js +5 -0
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
- package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/meshing/SimpleMesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ClipShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/analysis/AnalysisView3D.d.ts +2 -2
- package/views/3d/analysis/AnalysisView3D.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/constraints/AltitudeConstraint.d.ts +1 -1
- package/views/3d/constraints/AltitudeConstraint.js +1 -1
- package/views/3d/constraints/ClipDistanceConstraint.d.ts +1 -1
- package/views/3d/constraints/ClipDistanceConstraint.js +1 -1
- package/views/3d/constraints/Constraints.d.ts +7 -4
- package/views/3d/constraints/Constraints.js +1 -1
- package/views/3d/constraints/TiltConstraint.d.ts +1 -1
- package/views/3d/constraints/TiltConstraint.js +1 -1
- package/views/3d/environment/LocalAtmosphere.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/factoryUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +3 -2
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl/ManagedColorAttachment.d.ts +2 -2
- package/views/3d/webgl/ManagedColorAttachment.js +1 -1
- package/views/3d/webgl/ManagedDepthAttachment.d.ts +2 -2
- package/views/3d/webgl/ManagedDepthAttachment.js +1 -1
- package/views/3d/webgl/ManagedDepthTexture.js +1 -1
- package/views/3d/webgl/ManagedFBO.d.ts +8 -6
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl/ManagedFBOAttachment.d.ts +2 -2
- package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
- package/views/3d/webgl/ManagedFBOResource.d.ts +1 -1
- package/views/3d/webgl/ManagedFBOResource.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +55 -23
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.d.ts +1 -2
- package/views/MapView.d.ts +10 -15
- package/views/PopupView.d.ts +6 -6
- package/views/SceneView.d.ts +3 -4
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.d.ts +11 -13
- package/views/View2D.d.ts +37 -37
- package/views/analysis/AnalysisView.d.ts +1 -1
- package/views/analysis/AnalysisView.js +1 -1
- package/views/draw/{input/CursorUpdateEvent.d.ts → CursorUpdateEvent.d.ts} +1 -1
- package/views/draw/{input/CursorUpdateEvent.js → CursorUpdateEvent.js} +1 -1
- package/views/draw/{input/DrawCompleteEvent.d.ts → DrawCompleteEvent.d.ts} +1 -1
- package/views/draw/{input/DrawCompleteEvent.js → DrawCompleteEvent.js} +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/MultipointDrawAction.d.ts +4 -4
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.d.ts +2 -2
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.d.ts +4 -4
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.d.ts +4 -4
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.d.ts +3 -3
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/{input/VertexAddEvent.d.ts → VertexAddEvent.d.ts} +1 -1
- package/views/draw/{input/VertexAddEvent.js → VertexAddEvent.js} +1 -1
- package/views/draw/{input/VertexRemoveEvent.d.ts → VertexRemoveEvent.d.ts} +1 -1
- package/views/draw/VertexRemoveEvent.js +5 -0
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/sketch/Units.d.ts +3 -0
- package/views/layers/HighlightLayerViewMixin.d.ts +1 -3
- package/views/layers/ImageryLayerViewMixin.d.ts +1 -3
- package/views/layers/KMLLayerView.d.ts +1 -1
- package/views/layers/MediaLayerViewMixin.d.ts +3 -2
- package/views/layers/MediaLayerViewMixin.js +1 -1
- package/views/support/GeodesicMeasurementWorker.js +5 -0
- package/views/support/GeodesicMeasurementWorkerHandle.js +5 -0
- package/views/support/HighlightOptions.d.ts +0 -1
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/support/automaticAreaMeasurementUtils.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/types.d.ts +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/views/webgl/textureTracer.js +5 -0
- package/webdoc/support/SlideThumbnail.d.ts +1 -1
- package/webdoc/support/SlideThumbnail.js +1 -1
- package/webmap/Bookmark.d.ts +2 -1
- package/webmap/Bookmark.js +1 -1
- package/webmap/Version.d.ts +2 -2
- package/webmap/Version.js +1 -1
- package/webmap/utils.js +1 -1
- package/webscene/Slide.d.ts +6 -3
- package/webscene/Slide.js +1 -1
- package/webscene/Version.d.ts +2 -2
- package/webscene/Version.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/webscene/support/SlideEnvironment.d.ts +1 -1
- package/webscene/support/SlideEnvironment.js +1 -1
- package/webscene/support/SlideVisibleLayer.d.ts +1 -1
- package/webscene/support/SlideVisibleLayer.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/VisibleElements.d.ts +1 -1
- package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm.d.ts +2 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/ActionColumn.d.ts +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +2 -2
- package/widgets/FeatureTable/FieldColumn.d.ts +1 -1
- package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
- package/widgets/FeatureTable/support/FieldColumnTemplate.d.ts +1 -1
- package/widgets/FeatureTable/support/GroupColumnTemplate.d.ts +1 -1
- package/widgets/FeatureTable/support/TableTemplate.d.ts +1 -1
- package/widgets/FeatureTable/support/{interfaces.d.ts → types.d.ts} +1 -1
- package/widgets/FeatureTable.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/PanoramicViewer/support/importUtils.js +1 -1
- package/widgets/Print/PrintViewModel.d.ts +1 -1
- package/widgets/Sketch/CreateToolVisibilityMap.d.ts +1 -1
- package/widgets/Sketch/CreateToolVisibilityMap.js +1 -1
- package/widgets/Sketch/SelectionToolVisibilityMap.d.ts +1 -1
- package/widgets/Sketch/SelectionToolVisibilityMap.js +1 -1
- package/widgets/Sketch/VisibleElements.d.ts +5 -3
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.d.ts +2 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice/SliceViewModel.d.ts +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/support/AnalysisViewModel.d.ts +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.d.ts +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/assets/esri/core/libs/libtess/libtess.wasm +0 -0
- package/assets/esri/core/workers/chunks/00e407d262c49890afa8.js +0 -1
- package/assets/esri/core/workers/chunks/19db60a3b4b09d445bd1.js +0 -1
- package/assets/esri/core/workers/chunks/1e55f152b60145f33b61.js +0 -1
- package/assets/esri/core/workers/chunks/294acaaebfedb05fe81e.js +0 -1
- package/assets/esri/core/workers/chunks/31eda00e6842005d0ec8.js +0 -1
- package/assets/esri/core/workers/chunks/3d49c6427120edc8eac9.js +0 -1
- package/assets/esri/core/workers/chunks/404229f10aef5ac23c87.js +0 -1
- package/assets/esri/core/workers/chunks/4278b35fb6fd578c403e.js +0 -1
- package/assets/esri/core/workers/chunks/46b63a65484b102e9ccb.js +0 -1
- package/assets/esri/core/workers/chunks/4f03d19a70dca6c507be.js +0 -316
- package/assets/esri/core/workers/chunks/5686220aed9a74dbd2b1.js +0 -1
- package/assets/esri/core/workers/chunks/5a2933ae19345b7d5aa7.js +0 -1
- package/assets/esri/core/workers/chunks/5e9fdd4eff7189f45932.js +0 -1
- package/assets/esri/core/workers/chunks/67a45faa80316f43c51b.js +0 -1
- package/assets/esri/core/workers/chunks/68ee11589de0da7fed08.js +0 -1
- package/assets/esri/core/workers/chunks/82ced9254b27707522ef.js +0 -1
- package/assets/esri/core/workers/chunks/bb5373ff7cdad7270095.js +0 -1
- package/assets/esri/core/workers/chunks/bddaa83fcb9fdb1e1856.js +0 -1
- package/assets/esri/core/workers/chunks/d048e4926e78458afa3e.js +0 -1
- package/assets/esri/core/workers/chunks/d199deff988eaefe18b4.js +0 -1
- package/assets/esri/core/workers/chunks/d77f56576a49a998164a.js +0 -1
- package/assets/esri/core/workers/chunks/dae09fb8da0faa6dede4.js +0 -1
- package/assets/esri/core/workers/chunks/e16e88de4e93b0f48b2c.js +0 -1
- package/chunks/libtess-asm.js +0 -5
- package/chunks/libtess.js +0 -5
- package/layers/BlendMode.d.ts +0 -2
- package/layers/LayerListMode.d.ts +0 -2
- package/layers/LayerType.d.ts +0 -2
- package/popup/content/support/mediaInfoTypes.d.ts +0 -7
- package/support/modeUtils.d.ts +0 -2
- package/views/SelectionManager.d.ts +0 -1
- package/views/draw/input/VertexRemoveEvent.js +0 -5
- package/views/webgl/Texture.d.ts +0 -6
- /package/portal/{interfaces.d.ts → types.d.ts} +0 -0
- /package/rest/support/{interfaces.d.ts → types.d.ts} +0 -0
- /package/views/draw/{input/VertexUpdateEvent.js → VertexUpdateEvent.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type CursorUpdateEvent from "./CursorUpdateEvent.js";
|
|
1
2
|
import type DrawAction from "./DrawAction.js";
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
4
|
-
import type { VertexAddEvent } from "./input/VertexAddEvent.js";
|
|
3
|
+
import type DrawCompleteEvent from "./DrawCompleteEvent.js";
|
|
4
|
+
import type VertexAddEvent from "./VertexAddEvent.js";
|
|
5
5
|
import type { DrawActionProperties } from "./DrawAction.js";
|
|
6
6
|
|
|
7
7
|
export interface SegmentDrawActionProperties extends DrawActionProperties, Partial<Pick<SegmentDrawAction, "mode">> {}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../core/accessorSupport/decorators.js";import r from"../../geometry/Point.js";import s from"./
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../core/accessorSupport/decorators.js";import r from"../../geometry/Point.js";import s from"./CursorUpdateEvent.js";import o from"./DrawAction.js";import n from"./DrawCompleteEvent.js";import a from"./VertexAddEvent.js";import{createViewAlignedCoordinateSystem as d}from"./support/surfaceCoordinateSystems.js";import{ViewEventPriorities as h}from"../input/InputManager.js";import{sketchKeys as p}from"../interactive/keybindings.js";import{EditGeometry as l,Part as c}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as _}from"../interactive/editGeometry/EditGeometryOperations.js";import{loadAutomaticLengthMeasurementUtils as m}from"../support/automaticLengthMeasurementUtils.js";import{createScreenPointFromEvent as g}from"../support/screenUtils.js";const v=["freehand","click"];let u=class extends o{constructor(e){super(e),this._isDragging=!1,this._panEnabled=!1,this._addVertexOnPointerUp=!1,this._drawTool=null,this.viewAlignedCoordinateSystem=null,this.mode="freehand"}initialize(){"2d"===this.view.type?this._addViewHandles():this.addResolvingPromise(this._addDrawTool())}destroy(){this._removeDrawTool(),this.emit("destroy")}complete(){this._completeDrawing()}_getGeometryZValue(){return this.hasZ&&this.vertices.length>0?this.vertices[0][2]:this.defaultZ}_addViewHandles(){"click"===this.mode?this.addHandles(this._getClickModeViewHandles()):this.addHandles(this._getDragModeViewHandles())}_getDragModeViewHandles(){return[this.view.on("immediate-click",e=>{if(e.stopPropagation(),e.mapPoint&&!this._panEnabled){null!=this.getCoordsFromScreenPoint(g(e))&&(this._vertexAddHandler(e),this._drawCompleteHandler(e))}},h.TOOL),this.view.on("pointer-down",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._panEnabled||(this._resetGeometry(),this._addVertexOnPointerUp=!0,this._cursorScreenPoint=g(e),this._activePointerId=e.pointerId,this._vertexAddHandler(e),this._isDragging=!1,"touch"===e.pointerType&&this._updateCursor()))},h.TOOL),this.view.on("pointer-move",e=>{this._abortSnapping(),null==this._activePointerId&&"touch"!==e.pointerType&&(this._cursorScreenPoint=g(e),this._updateCursor())},h.TOOL),this.view.on("pointer-drag",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._isDragging=!0,this._cursorScreenPoint=g(e),this._updateCursor())},h.TOOL),this.view.on("pointer-up",e=>{this._shouldHandlePointerEvent(e)&&this._addVertexOnPointerUp&&(this._abortSnapping(),this._activePointerId=null,this._isDragging&&this._vertexAddHandler(e),2===this._committedVertices.length&&this._drawCompleteHandler(e),this._isDragging=!1)},h.TOOL),this.view.on("key-down",e=>{e.key===p.complete&&this._cursorScreenPoint?(this._abortSnapping(),this._vertexAddHandler(e),this._drawCompleteHandler(e)):e.key===p.pan&&(this._panEnabled=!0)},h.TOOL),this.view.on("key-up",e=>{e.key===p.pan&&(this._panEnabled=!1)},h.TOOL),this.view.on("drag",e=>{null!=this._activePointerId&&e.stopPropagation()},h.TOOL),this.view.on("drag",["Shift"],e=>{e.stopPropagation()},h.TOOL)]}_getClickModeViewHandles(){return[this.view.on("pointer-down",e=>{this._abortSnapping(),this._cursorScreenPoint=g(e),this._activePointerId=e.pointerId,this._isDragging=!1,"touch"===e.pointerType&&this._updateCursor()},h.TOOL),this.view.on("pointer-move",e=>{this._abortSnapping(),this._cursorScreenPoint=g(e),null==this._activePointerId&&"touch"!==e.pointerType&&this._updateCursor()},h.TOOL),this.view.on("pointer-drag",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._isDragging=!0)},h.TOOL),this.view.on("pointer-up",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._activePointerId=null,e.stopPropagation(),this._isDragging||this._vertexAddHandler(e),2!==this.vertices.length||this._isDragging||this._drawCompleteHandler(e),this._isDragging=!1)},h.TOOL),this.view.on("key-down",e=>{e.key===p.vertexAdd&&this._cursorScreenPoint&&(this._vertexAddHandler(e),2===this.vertices.length&&this._drawCompleteHandler(e)),e.key===p.complete&&this._cursorScreenPoint&&2===this.vertices.length&&(this._vertexAddHandler(e),this._drawCompleteHandler(e))},h.TOOL)]}async _addDrawTool(){const[{LegacyDrawTool:e},t]=await Promise.all([import("./LegacyDrawTool.js"),m()]),i=new e({view:this.view,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"segment",mode:this.mode,automaticLengthMeasurementUtils:t});this.destroyed?i.destroy():(this._drawTool=i,this.view.addAndActivateTool(i),this.addHandles([i.on("vertex-add",e=>{1===e.vertices.length&&this.emit("vertex-add",new a(this.view,e.vertices[0].vertexIndex,i.getVertexCoords()))}),i.on("cursor-update",e=>{1===e.vertices.length&&this.emit("cursor-update",new s(this.view,e.vertices[0].vertexIndex,i.getVertexCoords()))}),i.on("complete",e=>{this.emit("draw-complete",new n(i.getVertexCoords())),this._removeDrawTool()}),this.view.on("key-down",e=>{e.key!==p.vertexAdd||e.repeat||"click"!==this.mode?e.key!==p.complete||e.repeat||i.completeCreateOperation():i.drawOperation.numCommittedVertices>0?i.completeCreateOperation():i.drawOperation.commitStagedVertex()},h.TOOL)]))}_removeDrawTool(){this._drawTool&&(this.view.tools.remove(this._drawTool),this._drawTool=null)}_addVertex(e){const t=this._coordinateHelper.arrayToVector(e);if(this._isDuplicateOfLastVertex(t))return;this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometryOperations.appendVertexToFirstPart(t),1===this._committedVertices.length&&(this.viewAlignedCoordinateSystem=d(this.view,this._committedVertices[0]));const i=this._committedVertices.length-1,r=new a(this.view,i,this.vertices);this.emit("vertex-add",r)}_updateCursor(){if(this._popCursorVertex(),!this._cursorScreenPoint)return;const e=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);null!=e&&this._pushCursorVertex(e.vertex,()=>this.emit("cursor-update",new s(this.view,this._activeComponent.vertices.length,this.vertices,null!=this._stagedVertex?new r(this._stagedVertex):null)))}_completeDrawing(){if(this._drawTool)return this._drawTool.completeCreateOperation(),void this.removeAllHandles();if(this._activePointerId=null,this._popCursorVertex(),this._cursorScreenPoint=null,this._isDragging=!1,this._abortSnapping(),null!=this._snappingManager&&this._snappingManager.doneSnapping(),this.vertices.length<1)return;const e=new n(this.vertices);this.emit("draw-complete",e),e.defaultPrevented||this.removeAllHandles()}_resetGeometry(){this._editGeometryOperations.destroy(),this._editGeometryOperations=new _(new l("polygon",this._coordinateHelper),2),this._activeComponent=new c(this._coordinateHelper.spatialReference,2),this._editGeometryOperations.data.parts.push(this._activeComponent)}};e([t({type:v})],u.prototype,"mode",void 0),u=e([i("esri.views.draw.SegmentDrawAction")],u);const w=u;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
class e{constructor(e,t,s){this.view=e,this.defaultPrevented=!1,this.type="vertex-add",this.vertexIndex=t,this.vertices=s}preventDefault(){this.defaultPrevented=!0}}export{e as
|
|
5
|
+
class e{constructor(e,t,s){this.view=e,this.defaultPrevented=!1,this.type="vertex-add",this.vertexIndex=t,this.vertices=s}preventDefault(){this.defaultPrevented=!0}}export{e as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
class e{constructor(e,t,s){this.view=e,this.defaultPrevented=!1,this.type="vertex-remove",this.vertexIndex=t,this.vertices=s}preventDefault(){this.defaultPrevented=!0}}export{e as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import{createTask as i}from"../../../core/asyncUtils.js";import s from"../../../core/Collection.js";import o from"../../../core/Error.js";import{EventedAccessor as r}from"../../../core/Evented.js";import n from"../../../core/Logger.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{destroyMaybe as h,abortMaybe as p,assertIsSome as l}from"../../../core/maybe.js";import{pausable as c,when as d,watch as m,initial as u,sync as v}from"../../../core/reactiveUtils.js";import{property as y,subclass as _}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../../../core/support/UpdatingHandles.js";import f from"../../../geometry/Point.js";import b from"../../../geometry/Polyline.js";import{fromPolylineUsingImportOperator as G,toGeometry as x}from"../../../geometry/operators/support/apiConverter.js";import{closeRingsAndFixWinding as M,geometryToCoordinates as C}from"../../../geometry/support/coordsUtils.js";import{isPoint as S}from"../../../geometry/support/typeUtils.js";import{interpolateCircle as E}from"../../../geometry/support/curves/circleUtils.js";import{deriveCircleFromCircularArc as O,toEllipticArc7 as w}from"../../../geometry/support/curves/circularArcUtils.js";import{getEndpoint as I,isCircularArc as L,isEllipticArc4 as H,isBezierCurve as k,isCoordinate as V,isEllipticArc7 as P}from"../../../geometry/support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as R}from"../../../geometry/support/curves/ellipticArc4Utils.js";import{wrapAtan2 as T}from"../../../geometry/support/curves/mathUtils.js";import A from"../../../layers/GraphicsLayer.js";import{SnappingVisualizer2D as U}from"../../2d/interactive/SnappingVisualizer2D.js";import{ConnectedReshapeManager as j}from"./ConnectedReshapeManager.js";import{screenDeltaToMapDelta as F,cloneMove as D}from"./drawUtils.js";import z from"./GraphicMover.js";import K from"./HighlightHelper.js";import{addUniqueLayer as N,isConnectedReshapeSupportedLayer as q}from"./layerUtils.js";import{createTooltipInfos as Z,connectTooltip as $,updateTranslateTooltipInfo as B,updateTranslateVertexTooltipInfo as J}from"./reshapeTooltipUtils.js";import{defaultSymbols as Q,createMidpointGraphics as W,createVertexGraphics as X,createCurveControlPointGraphics as Y,createCurveConstructionLineGraphics as tt,attributeKeys as et,getMidpoint as it,controlPointKinds as st,saveUpdatedCurveOrCoordinate as ot,toolIdAttribute as rt,splitCurve as nt,isSingleSegmentCircle as at,isSingleSegmentEllipse as ht}from"./reshapeUtils.js";import{ViewEventPriorities as pt}from"../../input/InputManager.js";import{createCoordinateHelper as lt}from"../../interactive/coordinateHelper.js";import{sketchKeys as ct}from"../../interactive/keybindings.js";import{EditGeometryOperations as dt}from"../../interactive/editGeometry/EditGeometryOperations.js";import mt from"../../interactive/sketch/SketchOptions.js";import{SnappingContext as ut}from"../../interactive/snapping/SnappingContext.js";import{makeTooltip as vt,enterInputModeIfAvailable as yt}from"../../interactive/tooltip/tooltipCommonUtils.js";const _t=Symbol(),gt={mode:"on-the-ground",offset:0};let ft=class extends r{constructor(t){super(t),this._updateHandlesOnExternalGeometryChange=null,this._activeOperationInfo=null,this._connectedReshapeManager=null,this._editGeometryOperations=null,this._segmentLabels=null,this._segmentLabelsImportTask=null,this._mover=null,this._snappingContext=null,this._snappingGraphicsLayer=null,this._hoverGraphic=null,this._snappingTask=null,this._stagedVertex=null,this._updatingHandles=new g,this.callbacks={onReshapeStart(){},onReshape(){},onReshapeStop(){},onMoveStart(){},onMove(){},onMoveStop(){},onGraphicClick(){}},this.connectedReshapeProviders=null,this.enableMidpoints=!0,this.enableCurveOnMidpoint=!1,this.enableMovement=!0,this.enableVertices=!0,this.graphic=null,this.highlightName=null,this.highlightsEnabled=!0,this.layer=null,this.snappingManager=null,this.symbols=Q,this.tooltip=null,this.activeTooltipInfo=null,this.sketchOptions=new mt,this.type="reshape",this.vertexGraphics=new s,this.curveControlPointGraphics=new s,this.constructionLineGraphics=new s,this.midpointGraphics=new s,this.selectedManipulators=new s,this.view=null}initialize(){const t=this.view;this._highlightHelper=new K({view:t}),this._setup(),this._updateHandlesOnExternalGeometryChange=c(()=>this.graphic?.geometry,t=>{if(!t)return;const e=new Set(this.selectedManipulators.map(It));this._highlightHelper.removeAll(),this._setUpHighlights(),this._setupGraphics(),this._clearSelection(),this.vertexGraphics.filter(t=>e.has(It(t))).forEach(t=>this._addToSelection(t));const{enableMovement:i,_mover:s,graphic:o,midpointGraphics:r,vertexGraphics:n,curveControlPointGraphics:a}=this,h=n.concat(r,a).toArray();i&&h.push(o),s?.set("graphics",h)},v),this.tooltip=vt(()=>({view:t,options:this.sketchOptions.tooltips})),this.tooltipInfos=Z(this.sketchOptions),this.addHandles([d(()=>t?.ready,()=>{const{layer:t,view:e}=this;N(e,t),this.addHandles(e.on("key-down",t=>this._keyDownHandler(t),pt.TOOL))},{once:!0,initial:!0}),m(()=>this.graphic,()=>this.refresh()),m(()=>this.layer,(t,e)=>{e&&(this._clearSelection(),this._resetGraphics(e)),this.refresh()}),m(()=>[this.highlightsEnabled,this.highlightName],()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()}),m(()=>this.enableMidpoints,()=>this.refresh()),$(this.tooltip,()=>this._tooltipsContext),m(()=>this.sketchOptions.labels.enabled,t=>{this._segmentLabels?this._segmentLabels.visible=t:this._setUpGeometryHelper()}),m(()=>this.view.effectiveTheme.accentColor,()=>this._updateSymbolsForTheme(),u),this._updateHandlesOnExternalGeometryChange]),this._updateTooltip()}destroy(){this._reset(),this._mover=h(this._mover),this._connectedReshapeManager=h(this._connectedReshapeManager),this.tooltip=h(this.tooltip),this._segmentLabelsImportTask=p(this._segmentLabelsImportTask),this._segmentLabels=h(this._segmentLabels),this._updatingHandles=h(this._updatingHandles)}get _coordinateHelper(){return this._editGeometryOperations?.data.coordinateHelper??lt(!!this.graphic.geometry?.hasZ,!!this.graphic.geometry?.hasM,this.view.spatialReference)}get test(){return{segmentLabels:this._segmentLabels}}get _selectedManipulator(){return 1===this.selectedManipulators.length?this.selectedManipulators.at(0):void 0}get _tooltipsContext(){const{automaticAreaMeasurementUtils:t,automaticLengthMeasurementUtils:e,sketchOptions:i,activeTooltipInfo:s,graphic:o}=this;return{sketchOptions:i,activeTooltipInfo:s,graphic:o,selectedVertex:this._selectedManipulator,automaticAreaMeasurementUtils:t,automaticLengthMeasurementUtils:e,updateGeometry:(t,e,i,s,o)=>{this._setUpGeometryHelper();const r=t===this.graphic;r?this._emitMoveStartEvent(0,0):this._emitReshapeStartEvent(t);const n=!0;if(this._syncGeometryAfterVertexMove(t,e,s,o,n),r){const{view:t}=this,s=t.toScreen(i),o=t.toScreen(e),r=(o?.x??0)-(s?.x??0),n=(o?.y??0)-(s?.y??0);this._emitMoveEvent(r,n),this._emitMoveStopEvent(r,n)}else this._emitReshapeEvent(t),this._emitReshapeStopEvent(t)}}}get state(){const t=this.view.ready,e=!(!this.graphic||!this.layer);return t&&e?"active":t?"ready":"disabled"}get updating(){return this._updatingHandles.updating}isUIGraphic(t){return t===this.graphic||this._isMidpoint(t)||this._isCurveControlPoint(t)||this._isVertex(t)||this._isConstructionLine(t)}refresh(){this._reset(),this._setup()}reset(){this.graphic=null}clearSelection(){this._clearSelection()}removeSelectedVertices(){const{selectedManipulators:t}=this;t.length&&this._removeVertices(t)}_setup(){const{graphic:t,layer:e}=this;if(!e||null==t?.geometry)return;const i=t.geometry;"mesh"!==i.type&&"extent"!==i.type?("polygon"===i.type&&M(i),this._setUpHighlights(),this._setupGraphics(),this._setupMover(),this._setupConnectedReshapeManager(),this._setUpGeometryHelper()):this._logGeometryTypeError()}_setUpHighlights(){this.highlightsEnabled&&this.graphic&&this._highlightHelper?.add(this.graphic,this.highlightName)}_setUpGeometryHelper(){const t=this.graphic.geometry;if(null==t||"mesh"===t.type||"extent"===t.type)return this._segmentLabels=h(this._segmentLabels),void this._logGeometryTypeError();this._editGeometryOperations?this._syncEditGeometryOperations(t):this._editGeometryOperations=dt.fromGeometry(t,2,{allowCurves:!0}),this._updatingHandles.addPromise(this._setupSegmentLabels())}_saveSnappingContextForHandle(t,e){this._snappingGraphicsLayer=new A({listMode:"hide",internal:!0,title:"Reshape snapping layer"}),this.view.map.layers.add(this._snappingGraphicsLayer);const i=this._editGeometryOperations;l(i),this._snappingContext=new ut({editGeometryOperations:i,elevationInfo:gt,pointer:e.viewEvent?.pointerType||"mouse",excludeFeature:this.graphic,feature:this.graphic,visualizer:new U(this._snappingGraphicsLayer),vertexHandle:this._getVertexFromEditGeometry(t)})}_reset(){this._clearSelection(),this._highlightHelper?.removeAll(),this._updateTooltip(),this._resetGraphics(),this._resetSnappingStateVars(),this._segmentLabelsImportTask=p(this._segmentLabelsImportTask),this._segmentLabels=h(this._segmentLabels),this._activeOperationInfo=null,this._mover=h(this._mover),this.removeHandles(_t)}_resetSnappingStateVars(){null!=this.snappingManager&&this.snappingManager.doneSnapping(),null!=this._snappingGraphicsLayer&&(this.view?.map&&this.view.map.layers.remove(this._snappingGraphicsLayer),this._snappingGraphicsLayer.destroy()),this._snappingTask=p(this._snappingTask),this._snappingTask=null,this._snappingContext=null,this._stagedVertex=null}_resetGraphics(t){this._removeMidpointGraphics(t),this._removeVertexGraphics(t),this._removeCurveGraphics(t),this._updateTooltip()}_removeMidpointGraphics(t=this.layer){const{midpointGraphics:e}=this;t?.removeMany(e.items),e.drain(h)}_removeVertexGraphics(t=this.layer){const{vertexGraphics:e}=this;t?.removeMany(e.items),e.drain(h)}_removeCurveGraphics(t=this.layer){const{curveControlPointGraphics:e,constructionLineGraphics:i}=this;t?.removeMany(e.items),t?.removeMany(i.items),e.drain(h),i.drain(h)}_setupGraphics(){const t=this.graphic.geometry;if(null!=t&&("polyline"===t.type||"polygon"===t.type||"multipoint"===t.type)){const e=bt(t);this.enableMidpoints&&"multipoint"!==t.type&&this._setUpMidpointGraphics(e),this.enableVertices&&(this._setUpVertexGraphics(e),this._setupCurveGraphics(e))}}_setUpMidpointGraphics(t){this._removeMidpointGraphics();const e=W(t,this.symbols,this._coordinateHelper,"polygon"===this.graphic.geometry?.type);this.midpointGraphics.addMany(e),this.layer.addMany(e)}_setUpVertexGraphics(t){this._removeVertexGraphics();const e=X(t,this.symbols,this._coordinateHelper);this.vertexGraphics.addMany(e),this._storeRelatedVertexIndices(),this.layer.addMany(e)}_setupCurveGraphics(t){this._removeCurveGraphics();const e=Y(t,this.symbols,this._coordinateHelper),i=tt(t,this.symbols,this._coordinateHelper);this.curveControlPointGraphics.addMany(e),this.constructionLineGraphics.addMany(i),this.layer.addMany(i),this.layer.addMany(e)}async _setupSegmentLabels(){const t=this._editGeometryOperations,e=this.sketchOptions.labels.enabled;if(t&&this._segmentLabels?.context?.editGeometryOperations===t&&e||(this._segmentLabels=h(this._segmentLabels)),!this._segmentLabels&&t&&e){const e=this._segmentLabelsImportTask??=i(async t=>{const e=import("../../2d/interactive/SegmentLabels2D.js"),{SegmentLabels2D:i}=await this._updatingHandles.addPromise(e);return t.aborted?null:i}),s=await e.promise;if(!s)return;this._segmentLabels=h(this._segmentLabels),this._segmentLabels=new s({context:{view:this.view,editGeometryOperations:t,elevationInfo:gt,labelOptions:this.sketchOptions.labels,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils},visible:!0})}}_updateSymbolsForTheme(){const t=this.view.effectiveTheme.accentColor;this.symbols={vertices:{...this.symbols.vertices,default:this.symbols.vertices.default.clone().set("color",t),hover:this.symbols.vertices.hover?.clone().set("color",t)},controlPoints:{...this.symbols.controlPoints,default:this.symbols.controlPoints.default.clone().set("color",t),hover:this.symbols.controlPoints.hover?.clone().set("color",t)},midpoints:{...this.symbols.midpoints},constructionLines:this.symbols.constructionLines.clone().set("color",t)};for(const e of this.vertexGraphics)this._isSelected(e)?e.symbol=this.symbols.vertices.selected:this._hoverGraphic===e?e.symbol=this.symbols.vertices.hover:e.symbol=this.symbols.vertices.default;for(const e of this.curveControlPointGraphics)this._isSelected(e)?e.symbol=this.symbols.controlPoints.selected:this._hoverGraphic===e?e.symbol=this.symbols.controlPoints.hover:e.symbol=this.symbols.controlPoints.default;for(const e of this.constructionLineGraphics)e.symbol=this.symbols.constructionLines}_storeRelatedVertexIndices(){const t=this.vertexGraphics.items;if(!t)return;const e=t.map(({geometry:t})=>({x:t.x,y:t.y}));for(let i=0;i<e.length;i++){const s=[];for(let t=0;t<e.length;t++){if(i===t)continue;const o=e[i],r=e[t];o.x===r.x&&o.y===r.y&&s.push(t)}t[i].attributes[et.relatedGraphicIndices]=s}}_setupMover(){const{enableMovement:t,graphic:e,midpointGraphics:i,vertexGraphics:s,view:o}=this,r=s.concat(i,this.curveControlPointGraphics).toArray();t&&"multipoint"!==e.geometry?.type&&r.push(e),this._mover=new z({enableMoveAllGraphics:!1,highlightsEnabled:!1,indicatorsEnabled:!1,graphics:r,view:o,callbacks:{onGraphicClick:t=>this._onGraphicClickCallback(t),onGraphicMoveStart:t=>this._onGraphicMoveStartCallback(t),onGraphicMove:t=>this._onGraphicMoveCallback(t),onGraphicMoveStop:t=>this._onGraphicMoveStopCallback(t),onGraphicPointerOver:t=>this._onGraphicPointerOverCallback(t),onGraphicPointerOut:t=>this._onGraphicPointerOutCallback(t)}})}_setupConnectedReshapeManager(){const{connectedReshapeProviders:t}=this;null!=t&&0!==t.length&&(this._connectedReshapeManager=new j({providerFactories:t,view:this.view}))}_onGraphicClickCallback(t){t.viewEvent.stopPropagation();const e=t.graphic,i=this._isCurveControlPoint(e);if(e===this.graphic)this.clearSelection(),this.emit("graphic-click",t),this.callbacks.onGraphicClick?.(t);else if(this._isMidpoint(e)){if(2===t.viewEvent.button)return;const i=this.graphic.clone(),s=this._handleMidpointClickOrStartMove(t);this.refresh(),s.length&&this._emitVertexAddEvent([e],i,s)}else if(this._isVertex(e)||i){if(t.viewEvent.stopPropagation(),2===t.viewEvent.button)return void(i||this._removeVertices(e));t.viewEvent.native.shiftKey||this._clearSelection(),this.selectedManipulators.includes(e)?this._removeFromSelection(e,!0):this._addToSelection(e)}}_setUpOperation(t){const{graphic:e,dx:i,dy:s}=t,o=e===this.graphic;this._resetSnappingStateVars(),this._setUpGeometryHelper(),this._saveSnappingContextForHandle(e,t),this._activeOperationInfo={target:this.graphic,mover:e,operationType:o?"move":"reshape",totalDx:i,totalDy:s}}_onGraphicMoveStartCallback(t){const{dx:e,dy:i,graphic:s}=t,o=this._connectedReshapeManager,r=o?Ht(this.graphic):null;if(s===this.graphic){const{geometry:n}=s;return this._setUpOperation(t),this._emitMoveStartEvent(e,i),r&&o?.startFeatureMove([r]),void(null!=n&&"point"===n.type&&this._onHandleMove(s,e,i,t,()=>{this._updateTooltip(this.graphic,t.viewEvent),this._emitMoveEvent(e,i)}))}const{selectedManipulators:n}=this;if(!n.includes(s)){if(this._clearSelection(),this._isMidpoint(s)){const e=this.graphic.clone(),i=this._handleMidpointClickOrStartMove(t);i.length&&(this._emitVertexAddEvent([s],e,i),this._refreshGraphicIndicesAttributes(i[0]))}this._addToSelection(s)}if(this._setUpOperation(t),r){const t=n.filter(t=>this._isVertex(t));o?.startVertexMove(r,kt(t))}this._emitReshapeStartEvent(s),this._onHandleMove(s,e,i,t,()=>{this._updateTooltip(s,t.viewEvent),this._emitReshapeEvent(s)})}_onGraphicMoveCallback(t){const e=this._activeOperationInfo;if(!e)return;const{dx:i,dy:s,graphic:o}=t;e.totalDx+=i,e.totalDy+=s;const{operationType:r}=e,{geometry:n}=o;if(null!=n)if("move"!==r)this._onHandleMove(o,i,s,t,()=>{this._updateTooltip(o,t.viewEvent),this._emitReshapeEvent(o)});else{if("point"===n.type)this._onHandleMove(o,i,s,t,()=>{this._updateTooltip(this.graphic,t.viewEvent),this._emitMoveEvent(i,s)});else if("polyline"===n.type||"polygon"===n.type){const e=bt(n);this._updateVertexGraphicLocations(e);const{dxMap:o,dyMap:r}=F(i,s,this.view);this._connectedReshapeManager?.translate(o,r,0),this._updateTooltip(this.graphic,t.viewEvent),this._emitMoveEvent(i,s)}this._syncEditGeometryOperations(n)}}_onGraphicMoveStopCallback(t){const e=this._activeOperationInfo;if(!e)return;const{dx:i,dy:s,graphic:o}=t,{operationType:r}=e;e.totalDx+=i,e.totalDy+=s,this._onHandleMove(o,i,s,t,()=>"move"===r?this._emitMoveStopEvent():this._emitReshapeStopEvent(o)),this._isMidpoint(o)||o.getAttribute(et.curveFromStraightEdgeFlag)?this.refresh():(this._updateTooltip(this._isVertex(o)?o:null),this._resetSnappingStateVars(),this._connectedReshapeManager?.finish(),this._activeOperationInfo=null)}_updateVertexGraphicLocations(t){const{_coordinateHelper:e}=this;for(const i of this.vertexGraphics){const{pathIndex:s,pointIndex:o}=i.attributes;i.geometry=e.arrayToPoint(I(t[s][o]))}this._updateMidpointGraphicLocations(t),this._updateCurveGraphicLocations(t)}_updateMidpointGraphicLocations(t){const{_coordinateHelper:e}=this;for(const i of this.midpointGraphics){const{pathIndex:s,pointIndexStart:o,pointIndexEnd:r}=i.attributes,n=t[s];i.geometry=it(n[o],n[r],e)}}_updateCurveGraphicLocations(t){const{spatialReference:e}=this._coordinateHelper,i=new Map;for(const s of this.selectedManipulators){const[t,e]=wt(s);null!=t&&null!=e&&s.getAttribute(et.controlPointKind)&&a(i,t,()=>new Set)?.add(e)}for(const s of this.curveControlPointGraphics){const[e,o]=wt(s);if(i.get(e)?.has(o))continue;const r=t[e][o];if(L(r)||H(r)){const i=I(t[e][o-1]),n=L(r)?O(i,r):R(i,r),[a,h]=E(n,.25);s.geometry=new f({x:a,y:h,spatialReference:this._coordinateHelper.spatialReference})}else if(k(r)){const t=s.getAttribute(et.controlPointKind),[e,i]=t===st.bezier.cp1?r.b[1]:r.b[2];s.geometry=new f({x:e,y:i,spatialReference:this._coordinateHelper.spatialReference})}}for(const s of this.constructionLineGraphics){const i=s.getAttribute(et.controlPointKind),[o,r]=wt(s),n=t[o],a=I(n[r-1]),h=I(n[r]),p=t[o][r];i===st.bezier.line1?s.geometry=new b({paths:[[[a[0],a[1]],[...p.b[1]]]],spatialReference:e}):s.geometry=new b({paths:[[[h[0],h[1]],[...p.b[2]]]],spatialReference:e})}}_refreshGraphicIndicesAttributes(t){const{componentIndex:e,vertexIndex:i}=t,s=t=>{const[s,o]=wt(t);s===e&&o>=i&&t.setAttribute(et.pointIndex,o+1)};this.vertexGraphics.forEach(s),this.curveControlPointGraphics.forEach(s),this.constructionLineGraphics.forEach(s);for(const o of this.midpointGraphics){if(o.getAttribute(et.pathIndex)!==e)continue;const t=o.getAttribute(et.pointIndexStart);t>=i&&(o.setAttribute(et.pointIndexStart,t+1),o.setAttribute(et.pointIndexEnd,o.getAttribute(et.pointIndexEnd)+1))}}_getVertexFromEditGeometry(t){const[e,i]=wt(t);return l(this._editGeometryOperations),this._editGeometryOperations.data.parts[e].vertices[i]}_onHandleMove(t,e,s,o,r){p(this._snappingTask);const n=this._snappingContext;if(!n)return;const a=t.geometry,h="graphic-move-stop"===o.type;if(a&&S(a))if(null!=this.snappingManager&&this.selectedManipulators.length<2&&!h){const o=this.snappingManager;this._stagedVertex=o.update({point:a,context:n}),this._syncGeometryAfterVertexMove(t,new f(this._stagedVertex),e,s,h),r(),this._snappingTask=i(async i=>{const p=await o.snap({point:a,context:n,signal:i});p.valid&&(this._stagedVertex=p.apply(),this._syncGeometryAfterVertexMove(t,new f(this._stagedVertex),e,s,h),r())})}else{const i=null!=this._stagedVertex?new f(this._stagedVertex):a;this._syncGeometryAfterVertexMove(t,i,e,s,h),r()}else r()}_syncGeometryAfterVertexMove(t,e,i,s,o=!1){const r=this._editGeometryOperations?.data.geometry.clone();if(!r)return;const{_coordinateHelper:n}=this,a=n.pointToVector(e),h=this._getVertexFromEditGeometry(t);if(h){const t=n.getZ(a),e=a[0]-h.pos[0],i=a[1]-h.pos[1],s=null!=t?t-h.pos[2]:0;"point"!==r.type&&"mesh"!==r.type||this._editGeometryOperations?.moveVertices([h],e,i,s),this._connectedReshapeManager?.translate(e,i,s)}if("point"===r.type)t.geometry=e;else if("mesh"===r.type)t.geometry=r.centerAt(e);else{if(t!==this.graphic){const o=n.spatialReference,[a,h]=wt(t);let p=Gt(r);const l=n.pointToArray(e);this._updateGeometryFromGraphic(t,p,a,h,l,o,"polygon"===r.type),this._isVertex(t)||this._isCurveControlPoint(t)?(p=this._moveRelatedCoordinates(p,t,l),p=this._moveSelectedHandleCoordinates(p,t,i,s,"polygon"===r.type),this._updateMidpointGraphicLocations(p),this._updateCurveGraphicLocations(p)):this._isMidpoint(t)&&this._updateCurveGraphicLocations(p),ot(r,p)}this._updateGraphicGeometry(r),this._syncEditGeometryOperations(r),o&&(this._mover?this._mover.updateGeometry(this._mover.graphics.indexOf(t),e):t.geometry=e)}}_syncEditGeometryOperations(t){const e=this._editGeometryOperations?.trySetGeometry(t);e||(this._editGeometryOperations=null,this._setUpGeometryHelper())}_moveRelatedCoordinates(t,e,i){const{relatedGraphicIndices:s}=e.attributes,o=this._coordinateHelper.spatialReference;if(!s?.length)return t;for(const r of s){const s=this.vertexGraphics.at(r),[n,a]=wt(s);Ot(t,n,a,i,o),s.geometry=e.geometry}return t}_moveSelectedHandleCoordinates(t,e,i,s,o){const r=this._coordinateHelper.spatialReference;for(const n of this.selectedManipulators)if(n!==e){const[e,a]=wt(n),h=n.getAttribute(et.relatedGraphicIndices),p=D(n.geometry,i,s,this.view),l=C(p);if(n.geometry=p,this._updateGeometryFromGraphic(n,t,e,a,l,r,o),h?.length)for(const i of h){const e=this.vertexGraphics.at(i),[s,o]=wt(e);Ot(t,s,o,l,r),e.geometry=p}}return t}_updateGeometryFromGraphic(t,e,i,s,o,r,n){const a=e[i].length-1;this._isCurveControlPoint(t)?Mt(e,i,s,[o[0],o[1]],t.getAttribute(et.controlPointKind)):(Ot(e,i,s,o,r),n&&(0===s?Ot(e,i,a,o,r):s===a&&(e[i][0]=o)))}_onGraphicPointerOverCallback(t){const e=t.graphic;this._hoverGraphic=e;const i=this._isVertex(e);i&&!this._isSelected(e)?e.symbol=this.symbols.vertices.hover:this._isCurveControlPoint(e)&&!this._isSelected(e)&&(e.symbol=this.symbols.controlPoints.hover),this._updateTooltip(i?e:null),this._updateHoverCursor(e)}_onGraphicPointerOutCallback(t){const e=t.graphic;this._hoverGraphic=null,this._isVertex(e)&&!this._isSelected(e)&&(e.symbol=this.symbols.vertices.default),this._isCurveControlPoint(e)&&!this._isSelected(e)&&(e.symbol=this.symbols.controlPoints.default),this.removeHandles(_t),this._updateTooltip()}_handleMidpointClickOrStartMove(t){const{graphic:e}=t,i=this.graphic.geometry;if(null==i||"polygon"!==i.type&&"polyline"!==i.type)return[];const s=i.clone(),o=[],{[et.pathIndex]:r,[et.pointIndexStart]:n,[et.pointIndexEnd]:a}=e.attributes,h=C(e.geometry),p=0===a?n+1:a;e.attributes={[et.tool]:rt,[et.pathIndex]:r,[et.pointIndex]:p,[et.relatedGraphicIndices]:[]};const l=Gt(s),c=l[r][a];if(V(c)){if(this.enableCurveOnMidpoint&&t.viewEvent.native.shiftKey){const t=I(l[r][p]);l[r].splice(p,1,{c:[t,[h[0],h[1]]]}),e.setAttribute(et.controlPointKind,st.circle.interior),e.setAttribute(et.curveFromStraightEdgeFlag,!0),this.midpointGraphics.remove(e),this.curveControlPointGraphics.push(e),ot(s,l)}else l[r].splice(p,0,h),o.push({coordinates:l[r][p],componentIndex:r,vertexIndex:p})}else{const t=I(l[r][n]),e=nt(t,c,.5,this._coordinateHelper);l[r].splice(a,1,...e),o.push({coordinates:I(l[r][p]),componentIndex:r,vertexIndex:p})}return this._updateGraphicGeometry(s),this._syncEditGeometryOperations(s),o}_addToSelection(t){const e=Lt(t);for(const i of e)this._isCurveControlPoint(i)?i.symbol=this.symbols.controlPoints.selected:i.symbol=this.symbols.vertices.selected,this.selectedManipulators.add(i),this._updateTooltip(i);this._emitSelectEvent(e)}_removeFromSelection(t,e){if(this._isVertex(t)){const{vertices:i}=this.symbols;t.symbol=e?i.hover:i.default}else if(this._isCurveControlPoint(t)){const{controlPoints:i}=this.symbols;t.symbol=e?i.hover:i.default}this.selectedManipulators.remove(t),this._emitDeselectEvent([t]),this._updateTooltip()}_clearSelection(){const t=this.selectedManipulators.toArray(),{controlPoints:e,vertices:i}=this.symbols;if(t.length>0){for(const s of t)this._isVertex(s)?s.symbol=i.default:this._isCurveControlPoint(s)&&(s.symbol=e.default);this.selectedManipulators.removeAll(),this._emitDeselectEvent(t),this._updateTooltip()}}_keyDownHandler(t){null==this._activeOperationInfo&&yt(t,this.tooltip)||ct.delete.includes(t.key)&&!t.repeat&&this.selectedManipulators.length&&(this._removeVertices(this.selectedManipulators),t.stopPropagation())}_removeVertices(t){const e=this.graphic.geometry,i=this.vertexGraphics.length;if(null==e||"polygon"!==e.type&&"polyline"!==e.type&&"multipoint"!==e.type)return;if("polygon"===e.type&&i<4||"multipoint"===e.type&&i<2||"polyline"===e.type&&i<3)return;const s=this.graphic.clone(),o=e.clone();let r=Gt(o);const n=[],a=Lt(t);for(const h of a){if(this._isCurveControlPoint(h))continue;const{x:t,y:e}=h.geometry;for(let i=0;i<r.length;i++){const s=r[i];for(let o=0;o<s.length;o++){const[a,h]=I(s[o]);if(t===a&&e===h){n.push({coordinates:I(r[i][o]),componentIndex:i,vertexIndex:o}),r[i].splice(Number(o),1);const t=r[i][o];t&&!V(t)&&(r[i][o]=I(t))}}}}if("polygon"===o.type)r=r.filter(t=>{if(t.length<2)return!1;const[e,i]=I(t[0]),[s,o]=I(t[t.length-1]);return(2!==t.length||e!==s||i!==o)&&(e===s&&i===o||t.push(t[0]),!0)});else if("polyline"===o.type)for(const h of r)1===h.length&&r.splice(r.indexOf(h),1);ot(o,r),this._updateGraphicGeometry(o),this.refresh(),this._emitVertexRemoveEvent(a,s,n)}_isVertex(t){return this.vertexGraphics.includes(t)}_isCurveControlPoint(t){return this.curveControlPointGraphics.includes(t)}_isConstructionLine(t){return this.constructionLineGraphics.includes(t)}_isSelected(t){return(this._isVertex(t)||this.curveControlPointGraphics.includes(t))&&this.selectedManipulators.includes(t)}_isMidpoint(t){return this.midpointGraphics.includes(t)}_updateHoverCursor(t){const e=this._isMidpoint(t)?"copy":"move";this.addHandles(this.view.acquireCursor(e,"high"),_t)}_updateTooltip(t,e){let i=null;const{graphic:s,view:o,tooltipInfos:r}=this,n=s?.geometry;"point"===n?.type?i=r.movePoint:this._selectedManipulator?i=r.selectedVertex:t===this.graphic?(i=r.translateGraphic,B(i,o,this._tooltipsContext,e)):t&&this.selectedManipulators.length>1&&(i=r.translateVertices,J(i,o,n,this._tooltipsContext,e)),this.activeTooltipInfo=i}_updateGraphicGeometry(t){this._updateHandlesOnExternalGeometryChange?.pause(),this.graphic.geometry=t,this._updateHandlesOnExternalGeometryChange?.resume()}_emitMoveStartEvent(t,e){const i={type:"move-start",mover:this.graphic,dx:t,dy:e};this.emit("move-start",i),this.callbacks.onMoveStart?.(i)}_emitMoveEvent(t,e){const i={type:"move",mover:this.graphic,dx:t,dy:e};this.emit("move",i),this.callbacks.onMove?.(i)}_emitMoveStopEvent(t,e){if(null==t||null==e){const i=this._activeOperationInfo;if(!i)return;t=i.totalDx,e=i.totalDy}const i={type:"move-stop",mover:this.graphic,dx:t,dy:e};this.emit("move-stop",i),this.callbacks.onMoveStop?.(i)}_emitReshapeStartEvent(t){const e={type:"reshape-start",graphic:this.graphic,mover:t,selected:this.selectedManipulators.toArray()};this.emit("reshape-start",e),this.callbacks.onReshapeStart?.(e)}_emitReshapeEvent(t){const e={type:"reshape",graphic:this.graphic,mover:t,selected:this.selectedManipulators.toArray()};this.emit("reshape",e),this.callbacks.onReshape?.(e)}_emitReshapeStopEvent(t){const e={type:"reshape-stop",graphic:this.graphic,mover:t,selected:this.selectedManipulators.toArray()};this.emit("reshape-stop",e),this.callbacks.onReshapeStop?.(e)}_emitSelectEvent(t){const e={type:"vertex-select",added:t};this.emit("select",e),this.callbacks.onVertexSelect?.(e)}_emitDeselectEvent(t){const e={type:"vertex-deselect",removed:t};this.emit("deselect",e),this.callbacks.onVertexDeselect?.(e)}_emitVertexAddEvent(t,e,i){const s={type:"vertex-add",added:t,graphic:this.graphic,oldGraphic:e,vertices:i};this.emit("vertex-add",s),this.callbacks.onVertexAdd?.(s)}_emitVertexRemoveEvent(t,e,i){const s={type:"vertex-remove",removed:t,graphic:this.graphic,oldGraphic:e,vertices:i};this.emit("vertex-remove",s),this.callbacks.onVertexRemove?.(s)}_logGeometryTypeError(){n.getLogger(this).error(new o("reshape:invalid-geometry","Reshape operation not supported for the provided graphic. The geometry type is not supported."))}};function bt(t){const e=Gt(t.clone());if("polygon"===t.type)for(const i of e){const t=i[i.length-1];if(!V(t))continue;const e=i[0];e[0]===t[0]&&e[1]===t[1]&&i.length>2&&i.pop()}return e}function Gt(t){return"polygon"===t.type?t.curveRings?.slice()??t.rings.slice():"polyline"===t.type?t.curvePaths?.slice()??t.paths.slice():t.points.map(t=>[t])}function xt(t,e,i,s){const o=t[e][i];if(L(o))o.c[1]=s;else if(H(o)){const o=I(t[e][i]);t[e][i]={c:[o,s]}}}function Mt(t,e,i,s,o){switch(o){case st.circle.interior:xt(t,e,i,s);break;case st.bezier.cp1:t[e][i].b[1]=s;break;case st.bezier.cp2:t[e][i].b[2]=s}}function Ct(t,e){return t<1e-8*e}function St(t,{cx:e,cy:i,isInvalid:s,thetaStart:o,thetaEnd:r},n,a){const[h,p]=t,[l,c]=n,d=l-h,m=c-p;e-=h,i-=p;const u=a?o>r:o<r,[v,y]=s?[e,i]:u?[-i,e]:[i,-e],[_,g]=[d,m],[f,b]=[v,y],G=_*b-g*f,x=(d**2+m**2)/2;if(Ct(Math.abs(G),x))return[(h+l)/2,(p+c)/2];const[M,C]=[b/G*x,-f/G*x],S=M**2+C**2,[E,O]=[d/2-M,m/2-C];if(Ct(E**2+O**2,S)){const[t,e]=u?[-C,M]:[C,-M];return[t+M+h,e+C+p]}const w=Math.sqrt((M**2+C**2)/(E**2+O**2))*Math.sign(d*v+m*y);return[E*w+M+h,O*w+C+p]}function Et(t,e,i){const s=G(new b({curvePaths:[[t,e]],spatialReference:i})),{curvePaths:o}=x(s,i),r=o[0][1];return P(r)?r:w(t,r)}function Ot(t,e,i,s,o){const r=t[e][i],n=t[e].at(i+1);if(at(t,e)){const i=t[e][1];return t[e][0]=[...s],void(t[e][1]={a:[[...s],[...i.a[1]],0,0]})}if(ht(t,e)){const i=t[e][1],[o,r]=i.a[1],[n,a]=s,h=Math.hypot(n-o,a-r),[p,l]=[n-o,a-r],c=T(l,p);return t[e][0]=[...s],void(t[e][1]={a:[[...s],[...i.a[1]],0,0,c,h,i.a[6]]})}const a=I(r);if(V(r))r.splice(0,r.length,...s);else if(k(r))r.b[0].splice(0,r.b[0].length,...s);else if(L(r)||H(r)){const o=I(t[e][i-1]),n=L(r)?O(o,r):R(o,r);t[e].splice(i,1,{c:[[...s],St(o,n,s,!0)]})}else if(P(r)){r.a[0].splice(0,r.a[0].length,...s);const n=I(t[e][i-1]);r.a=Et(n,r,o).a}if(n&&!V(n)&&!k(r))if(L(n)||H(n)){const o=I(n),r=L(n)?O(a,n):R(a,n);t[e].splice(i+1,1,{c:[o,St(o,r,s,!1)]})}else if(P(n)){const t=I(r);n.a=Et(t,n,o).a}}function wt({attributes:t}){return[t?.[et.pathIndex]||0,t?.[et.pointIndex]||0]}function It({attributes:t}){return`${t?.[et.pathIndex]}-${t?.[et.pointIndex]}`}function Lt(t){return t instanceof e?[t]:[...t]}function Ht(t){const e=t.sourceLayer??t.layer;return q(e)?{graphic:t,layer:e}:null}function kt(t){return t.toArray().map(({attributes:t})=>({pathIndex:t[et.pathIndex],vertexIndex:t[et.pointIndex]}))}t([y()],ft.prototype,"_activeOperationInfo",void 0),t([y()],ft.prototype,"_connectedReshapeManager",void 0),t([y()],ft.prototype,"_coordinateHelper",null),t([y()],ft.prototype,"_editGeometryOperations",void 0),t([y()],ft.prototype,"_segmentLabels",void 0),t([y()],ft.prototype,"test",null),t([y()],ft.prototype,"_segmentLabelsImportTask",void 0),t([y()],ft.prototype,"_updatingHandles",void 0),t([y()],ft.prototype,"_selectedManipulator",null),t([y()],ft.prototype,"_tooltipsContext",null),t([y()],ft.prototype,"callbacks",void 0),t([y()],ft.prototype,"connectedReshapeProviders",void 0),t([y()],ft.prototype,"enableMidpoints",void 0),t([y()],ft.prototype,"enableCurveOnMidpoint",void 0),t([y()],ft.prototype,"enableMovement",void 0),t([y()],ft.prototype,"enableVertices",void 0),t([y()],ft.prototype,"graphic",void 0),t([y()],ft.prototype,"highlightName",void 0),t([y()],ft.prototype,"highlightsEnabled",void 0),t([y()],ft.prototype,"layer",void 0),t([y()],ft.prototype,"snappingManager",void 0),t([y({readOnly:!0})],ft.prototype,"state",null),t([y()],ft.prototype,"symbols",void 0),t([y()],ft.prototype,"tooltip",void 0),t([y()],ft.prototype,"tooltipInfos",void 0),t([y()],ft.prototype,"activeTooltipInfo",void 0),t([y({constructOnly:!0})],ft.prototype,"automaticAreaMeasurementUtils",void 0),t([y({constructOnly:!0})],ft.prototype,"automaticLengthMeasurementUtils",void 0),t([y()],ft.prototype,"updating",null),t([y({type:mt})],ft.prototype,"sketchOptions",void 0),t([y({readOnly:!0})],ft.prototype,"type",void 0),t([y({readOnly:!0})],ft.prototype,"vertexGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"curveControlPointGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"constructionLineGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"midpointGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"selectedManipulators",void 0),t([y()],ft.prototype,"view",void 0),ft=t([_("esri.views.draw.support.Reshape")],ft);const Vt=ft;export{Vt as default};
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import{createTask as i}from"../../../core/asyncUtils.js";import s from"../../../core/Collection.js";import o from"../../../core/Error.js";import{EventedAccessor as r}from"../../../core/Evented.js";import n from"../../../core/Logger.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{destroyMaybe as h,abortMaybe as p,assertIsSome as l}from"../../../core/maybe.js";import{pausable as c,when as d,watch as m,initial as u,sync as v}from"../../../core/reactiveUtils.js";import{property as y,subclass as _}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../../../core/support/UpdatingHandles.js";import f from"../../../geometry/Point.js";import b from"../../../geometry/Polyline.js";import{fromPolylineUsingImportOperator as G,toGeometry as x}from"../../../geometry/operators/support/apiConverter.js";import{closeRingsAndFixWinding as M,geometryToCoordinates as C}from"../../../geometry/support/coordsUtils.js";import{isPoint as S}from"../../../geometry/support/typeUtils.js";import{interpolateCircle as E}from"../../../geometry/support/curves/circleUtils.js";import{deriveCircleFromCircularArc as O,toEllipticArc7 as w}from"../../../geometry/support/curves/circularArcUtils.js";import{getEndpoint as H,isCircularArc as I,isEllipticArc4 as L,isBezierCurve as k,isCoordinate as V,isEllipticArc7 as P}from"../../../geometry/support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as R}from"../../../geometry/support/curves/ellipticArc4Utils.js";import{wrapAtan2 as T}from"../../../geometry/support/curves/mathUtils.js";import A from"../../../layers/GraphicsLayer.js";import{SnappingVisualizer2D as U}from"../../2d/interactive/SnappingVisualizer2D.js";import{ConnectedReshapeManager as j}from"./ConnectedReshapeManager.js";import{screenDeltaToMapDelta as F,cloneMove as D}from"./drawUtils.js";import z from"./GraphicMover.js";import K from"./HighlightHelper.js";import{addUniqueLayer as N,isConnectedReshapeSupportedLayer as q}from"./layerUtils.js";import{createTooltipInfos as Z,connectTooltip as $,updateTranslateTooltipInfo as B,updateTranslateVertexTooltipInfo as J}from"./reshapeTooltipUtils.js";import{defaultSymbols as Q,createMidpointGraphics as W,createVertexGraphics as X,createCurveControlPointGraphics as Y,createCurveConstructionLineGraphics as tt,attributeKeys as et,getMidpoint as it,controlPointKinds as st,saveUpdatedCurveOrCoordinate as ot,toolIdAttribute as rt,splitCurve as nt,isSingleSegmentCircle as at,isSingleSegmentEllipse as ht}from"./reshapeUtils.js";import{ViewEventPriorities as pt}from"../../input/InputManager.js";import{createCoordinateHelper as lt}from"../../interactive/coordinateHelper.js";import{sketchKeys as ct}from"../../interactive/keybindings.js";import{EditGeometryOperations as dt}from"../../interactive/editGeometry/EditGeometryOperations.js";import mt from"../../interactive/sketch/SketchOptions.js";import{SnappingContext as ut}from"../../interactive/snapping/SnappingContext.js";import{makeTooltip as vt,enterInputModeIfAvailable as yt}from"../../interactive/tooltip/tooltipCommonUtils.js";const _t=Symbol(),gt={mode:"on-the-ground",offset:0};let ft=class extends r{constructor(t){super(t),this._updateHandlesOnExternalGeometryChange=null,this._activeOperationInfo=null,this._connectedReshapeManager=null,this._editGeometryOperations=null,this._segmentLabels=null,this._segmentLabelsImportTask=null,this._mover=null,this._snappingContext=null,this._snappingGraphicsLayer=null,this._hoverGraphic=null,this._snappingTask=null,this._stagedVertex=null,this._updatingHandles=new g,this.callbacks={onReshapeStart(){},onReshape(){},onReshapeStop(){},onMoveStart(){},onMove(){},onMoveStop(){},onGraphicClick(){}},this.connectedReshapeProviders=null,this.enableMidpoints=!0,this.enableCurveOnMidpoint=!1,this.enableMovement=!0,this.enableVertices=!0,this.graphic=null,this.highlightName=null,this.highlightsEnabled=!0,this.layer=null,this.snappingManager=null,this.symbols=Q,this.tooltip=null,this.activeTooltipInfo=null,this.sketchOptions=new mt,this.type="reshape",this.vertexGraphics=new s,this.curveControlPointGraphics=new s,this.constructionLineGraphics=new s,this.midpointGraphics=new s,this.selectedManipulators=new s,this.view=null}initialize(){const t=this.view;this._highlightHelper=new K({view:t}),this._setup(),this._updateHandlesOnExternalGeometryChange=c(()=>this.graphic?.geometry,t=>{if(!t)return;const e=new Set(this.selectedManipulators.map(Ht));this._highlightHelper.removeAll(),this._setUpHighlights(),this._setupGraphics(),this._clearSelection(),this.vertexGraphics.filter(t=>e.has(Ht(t))).forEach(t=>this._addToSelection(t));const{enableMovement:i,_mover:s,graphic:o,midpointGraphics:r,vertexGraphics:n,curveControlPointGraphics:a}=this,h=n.concat(r,a).toArray();i&&h.push(o),s?.set("graphics",h)},v),this.tooltip=vt(()=>({view:t,options:this.sketchOptions.tooltips})),this.tooltipInfos=Z(this.sketchOptions),this.addHandles([d(()=>t?.ready,()=>{const{layer:t,view:e}=this;N(e,t),this.addHandles(e.on("key-down",t=>this._keyDownHandler(t),pt.TOOL))},{once:!0,initial:!0}),m(()=>this.graphic,()=>this.refresh()),m(()=>this.layer,(t,e)=>{e&&(this._clearSelection(),this._resetGraphics(e)),this.refresh()}),m(()=>[this.highlightsEnabled,this.highlightName],()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()}),m(()=>this.enableMidpoints,()=>this.refresh()),$(this.tooltip,()=>this._tooltipsContext,this._updatingHandles),m(()=>this.sketchOptions.labels.enabled,t=>{this._segmentLabels?this._segmentLabels.visible=t:this._setUpGeometryHelper()}),m(()=>this.view.effectiveTheme.accentColor,()=>this._updateSymbolsForTheme(),u),this._updateHandlesOnExternalGeometryChange]),this._updateTooltip()}destroy(){this._reset(),this._mover=h(this._mover),this._connectedReshapeManager=h(this._connectedReshapeManager),this.tooltip=h(this.tooltip),this._segmentLabelsImportTask=p(this._segmentLabelsImportTask),this._segmentLabels=h(this._segmentLabels),this._updatingHandles=h(this._updatingHandles)}get _coordinateHelper(){return this._editGeometryOperations?.data.coordinateHelper??lt(!!this.graphic.geometry?.hasZ,!!this.graphic.geometry?.hasM,this.view.spatialReference)}get test(){return{segmentLabels:this._segmentLabels}}get _selectedManipulator(){return 1===this.selectedManipulators.length?this.selectedManipulators.at(0):void 0}get _tooltipsContext(){const{automaticAreaMeasurementUtils:t,automaticLengthMeasurementUtils:e,sketchOptions:i,activeTooltipInfo:s,graphic:o}=this;return{sketchOptions:i,activeTooltipInfo:s,graphic:o,selectedVertex:this._selectedManipulator,automaticAreaMeasurementUtils:t,automaticLengthMeasurementUtils:e,updateGeometry:(t,e,i,s,o)=>{this._setUpGeometryHelper();const r=t===this.graphic;r?this._emitMoveStartEvent(0,0):this._emitReshapeStartEvent(t);const n=!0;if(this._syncGeometryAfterVertexMove(t,e,s,o,n),r){const{view:t}=this,s=t.toScreen(i),o=t.toScreen(e),r=(o?.x??0)-(s?.x??0),n=(o?.y??0)-(s?.y??0);this._emitMoveEvent(r,n),this._emitMoveStopEvent(r,n)}else this._emitReshapeEvent(t),this._emitReshapeStopEvent(t)}}}get state(){const t=this.view.ready,e=!(!this.graphic||!this.layer);return t&&e?"active":t?"ready":"disabled"}get updating(){return this._updatingHandles.updating}isUIGraphic(t){return t===this.graphic||this._isMidpoint(t)||this._isCurveControlPoint(t)||this._isVertex(t)||this._isConstructionLine(t)}refresh(){this._reset(),this._setup()}reset(){this.graphic=null}clearSelection(){this._clearSelection()}removeSelectedVertices(){const{selectedManipulators:t}=this;t.length&&this._removeVertices(t)}_setup(){const{graphic:t,layer:e}=this;if(!e||null==t?.geometry)return;const i=t.geometry;"mesh"!==i.type&&"extent"!==i.type?("polygon"===i.type&&M(i),this._setUpHighlights(),this._setupGraphics(),this._setupMover(),this._setupConnectedReshapeManager(),this._setUpGeometryHelper()):this._logGeometryTypeError()}_setUpHighlights(){this.highlightsEnabled&&this.graphic&&this._highlightHelper?.add(this.graphic,this.highlightName)}_setUpGeometryHelper(){const t=this.graphic.geometry;if(null==t||"mesh"===t.type||"extent"===t.type)return this._segmentLabels=h(this._segmentLabels),void this._logGeometryTypeError();this._editGeometryOperations?this._syncEditGeometryOperations(t):this._editGeometryOperations=dt.fromGeometry(t,2,{allowCurves:!0}),this._updatingHandles.addPromise(this._setupSegmentLabels())}_saveSnappingContextForHandle(t,e){this._snappingGraphicsLayer=new A({listMode:"hide",internal:!0,title:"Reshape snapping layer"}),this.view.map.layers.add(this._snappingGraphicsLayer);const i=this._editGeometryOperations;l(i),this._snappingContext=new ut({editGeometryOperations:i,elevationInfo:gt,pointer:e.viewEvent?.pointerType||"mouse",excludeFeature:this.graphic,feature:this.graphic,visualizer:new U(this._snappingGraphicsLayer),vertexHandle:this._getVertexFromEditGeometry(t)})}_reset(){this._clearSelection(),this._highlightHelper?.removeAll(),this._updateTooltip(),this._resetGraphics(),this._resetSnappingStateVars(),this._segmentLabelsImportTask=p(this._segmentLabelsImportTask),this._segmentLabels=h(this._segmentLabels),this._activeOperationInfo=null,this._mover=h(this._mover),this.removeHandles(_t)}_resetSnappingStateVars(){null!=this.snappingManager&&this.snappingManager.doneSnapping(),null!=this._snappingGraphicsLayer&&(this.view?.map&&this.view.map.layers.remove(this._snappingGraphicsLayer),this._snappingGraphicsLayer.destroy()),this._snappingTask=p(this._snappingTask),this._snappingTask=null,this._snappingContext=null,this._stagedVertex=null}_resetGraphics(t){this._removeMidpointGraphics(t),this._removeVertexGraphics(t),this._removeCurveGraphics(t),this._updateTooltip()}_removeMidpointGraphics(t=this.layer){const{midpointGraphics:e}=this;t?.removeMany(e.items),e.drain(h)}_removeVertexGraphics(t=this.layer){const{vertexGraphics:e}=this;t?.removeMany(e.items),e.drain(h)}_removeCurveGraphics(t=this.layer){const{curveControlPointGraphics:e,constructionLineGraphics:i}=this;t?.removeMany(e.items),t?.removeMany(i.items),e.drain(h),i.drain(h)}_setupGraphics(){const t=this.graphic.geometry;if(null!=t&&("polyline"===t.type||"polygon"===t.type||"multipoint"===t.type)){const e=bt(t);this.enableMidpoints&&"multipoint"!==t.type&&this._setUpMidpointGraphics(e),this.enableVertices&&(this._setUpVertexGraphics(e),this._setupCurveGraphics(e))}}_setUpMidpointGraphics(t){this._removeMidpointGraphics();const e=W(t,this.symbols,this._coordinateHelper,"polygon"===this.graphic.geometry?.type);this.midpointGraphics.addMany(e),this.layer.addMany(e)}_setUpVertexGraphics(t){this._removeVertexGraphics();const e=X(t,this.symbols,this._coordinateHelper);this.vertexGraphics.addMany(e),this._storeRelatedVertexIndices(),this.layer.addMany(e)}_setupCurveGraphics(t){this._removeCurveGraphics();const e=Y(t,this.symbols,this._coordinateHelper),i=tt(t,this.symbols,this._coordinateHelper);this.curveControlPointGraphics.addMany(e),this.constructionLineGraphics.addMany(i),this.layer.addMany(i),this.layer.addMany(e)}async _setupSegmentLabels(){const t=this._editGeometryOperations,e=this.sketchOptions.labels.enabled;if(t&&this._segmentLabels?.context?.editGeometryOperations===t&&e||(this._segmentLabels=h(this._segmentLabels)),!this._segmentLabels&&t&&e){const e=this._segmentLabelsImportTask??=i(async t=>{const e=import("../../2d/interactive/SegmentLabels2D.js"),{SegmentLabels2D:i}=await this._updatingHandles.addPromise(e);return t.aborted?null:i}),s=await e.promise;if(!s)return;this._segmentLabels=h(this._segmentLabels),this._segmentLabels=new s({context:{view:this.view,editGeometryOperations:t,elevationInfo:gt,labelOptions:this.sketchOptions.labels,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils},visible:!0})}}_updateSymbolsForTheme(){const t=this.view.effectiveTheme.accentColor;this.symbols={vertices:{...this.symbols.vertices,default:this.symbols.vertices.default.clone().set("color",t),hover:this.symbols.vertices.hover?.clone().set("color",t)},controlPoints:{...this.symbols.controlPoints,default:this.symbols.controlPoints.default.clone().set("color",t),hover:this.symbols.controlPoints.hover?.clone().set("color",t)},midpoints:{...this.symbols.midpoints},constructionLines:this.symbols.constructionLines.clone().set("color",t)};for(const e of this.vertexGraphics)this._isSelected(e)?e.symbol=this.symbols.vertices.selected:this._hoverGraphic===e?e.symbol=this.symbols.vertices.hover:e.symbol=this.symbols.vertices.default;for(const e of this.curveControlPointGraphics)this._isSelected(e)?e.symbol=this.symbols.controlPoints.selected:this._hoverGraphic===e?e.symbol=this.symbols.controlPoints.hover:e.symbol=this.symbols.controlPoints.default;for(const e of this.constructionLineGraphics)e.symbol=this.symbols.constructionLines}_storeRelatedVertexIndices(){const t=this.vertexGraphics.items;if(!t)return;const e=t.map(({geometry:t})=>({x:t.x,y:t.y}));for(let i=0;i<e.length;i++){const s=[];for(let t=0;t<e.length;t++){if(i===t)continue;const o=e[i],r=e[t];o.x===r.x&&o.y===r.y&&s.push(t)}t[i].attributes[et.relatedGraphicIndices]=s}}_setupMover(){const{enableMovement:t,graphic:e,midpointGraphics:i,vertexGraphics:s,view:o}=this,r=s.concat(i,this.curveControlPointGraphics).toArray();t&&"multipoint"!==e.geometry?.type&&r.push(e),this._mover=new z({enableMoveAllGraphics:!1,highlightsEnabled:!1,indicatorsEnabled:!1,graphics:r,view:o,callbacks:{onGraphicClick:t=>this._onGraphicClickCallback(t),onGraphicMoveStart:t=>this._onGraphicMoveStartCallback(t),onGraphicMove:t=>this._onGraphicMoveCallback(t),onGraphicMoveStop:t=>this._onGraphicMoveStopCallback(t),onGraphicPointerOver:t=>this._onGraphicPointerOverCallback(t),onGraphicPointerOut:t=>this._onGraphicPointerOutCallback(t)}})}_setupConnectedReshapeManager(){const{connectedReshapeProviders:t}=this;null!=t&&0!==t.length&&(this._connectedReshapeManager=new j({providerFactories:t,view:this.view}))}_onGraphicClickCallback(t){t.viewEvent.stopPropagation();const e=t.graphic,i=this._isCurveControlPoint(e);if(e===this.graphic)this.clearSelection(),this.emit("graphic-click",t),this.callbacks.onGraphicClick?.(t);else if(this._isMidpoint(e)){if(2===t.viewEvent.button)return;const i=this.graphic.clone(),s=this._handleMidpointClickOrStartMove(t);this.refresh(),s.length&&this._emitVertexAddEvent([e],i,s)}else if(this._isVertex(e)||i){if(t.viewEvent.stopPropagation(),2===t.viewEvent.button)return void(i||this._removeVertices(e));t.viewEvent.native.shiftKey||this._clearSelection(),this.selectedManipulators.includes(e)?this._removeFromSelection(e,!0):this._addToSelection(e)}}_setUpOperation(t){const{graphic:e,dx:i,dy:s}=t,o=e===this.graphic;this._resetSnappingStateVars(),this._setUpGeometryHelper(),this._saveSnappingContextForHandle(e,t),this._activeOperationInfo={target:this.graphic,mover:e,operationType:o?"move":"reshape",totalDx:i,totalDy:s}}_onGraphicMoveStartCallback(t){const{dx:e,dy:i,graphic:s}=t,o=this._connectedReshapeManager,r=o?Lt(this.graphic):null;if(s===this.graphic){const{geometry:n}=s;return this._setUpOperation(t),this._emitMoveStartEvent(e,i),r&&o?.startFeatureMove([r]),void(null!=n&&"point"===n.type&&this._onHandleMove(s,e,i,t,()=>{this._updateTooltip(this.graphic,t.viewEvent),this._emitMoveEvent(e,i)}))}const{selectedManipulators:n}=this;if(!n.includes(s)){if(this._clearSelection(),this._isMidpoint(s)){const e=this.graphic.clone(),i=this._handleMidpointClickOrStartMove(t);i.length&&(this._emitVertexAddEvent([s],e,i),this._refreshGraphicIndicesAttributes(i[0]))}this._addToSelection(s)}if(this._setUpOperation(t),r){const t=n.filter(t=>this._isVertex(t));o?.startVertexMove(r,kt(t))}this._emitReshapeStartEvent(s),this._onHandleMove(s,e,i,t,()=>{this._updateTooltip(s,t.viewEvent),this._emitReshapeEvent(s)})}_onGraphicMoveCallback(t){const e=this._activeOperationInfo;if(!e)return;const{dx:i,dy:s,graphic:o}=t;e.totalDx+=i,e.totalDy+=s;const{operationType:r}=e,{geometry:n}=o;if(null!=n)if("move"!==r)this._onHandleMove(o,i,s,t,()=>{this._updateTooltip(o,t.viewEvent),this._emitReshapeEvent(o)});else{if("point"===n.type)this._onHandleMove(o,i,s,t,()=>{this._updateTooltip(this.graphic,t.viewEvent),this._emitMoveEvent(i,s)});else if("polyline"===n.type||"polygon"===n.type){const e=bt(n);this._updateVertexGraphicLocations(e);const{dxMap:o,dyMap:r}=F(i,s,this.view);this._connectedReshapeManager?.translate(o,r,0),this._updateTooltip(this.graphic,t.viewEvent),this._emitMoveEvent(i,s)}this._syncEditGeometryOperations(n)}}_onGraphicMoveStopCallback(t){const e=this._activeOperationInfo;if(!e)return;const{dx:i,dy:s,graphic:o}=t,{operationType:r}=e;e.totalDx+=i,e.totalDy+=s,this._onHandleMove(o,i,s,t,()=>"move"===r?this._emitMoveStopEvent():this._emitReshapeStopEvent(o)),this._isMidpoint(o)||o.getAttribute(et.curveFromStraightEdgeFlag)?this.refresh():(this._updateTooltip(this._isVertex(o)?o:null),this._resetSnappingStateVars(),this._connectedReshapeManager?.finish(),this._activeOperationInfo=null)}_updateVertexGraphicLocations(t){const{_coordinateHelper:e}=this;for(const i of this.vertexGraphics){const{pathIndex:s,pointIndex:o}=i.attributes;i.geometry=e.arrayToPoint(H(t[s][o]))}this._updateMidpointGraphicLocations(t),this._updateCurveGraphicLocations(t)}_updateMidpointGraphicLocations(t){const{_coordinateHelper:e}=this;for(const i of this.midpointGraphics){const{pathIndex:s,pointIndexStart:o,pointIndexEnd:r}=i.attributes,n=t[s];i.geometry=it(n[o],n[r],e)}}_updateCurveGraphicLocations(t){const{spatialReference:e}=this._coordinateHelper,i=new Map;for(const s of this.selectedManipulators){const[t,e]=wt(s);null!=t&&null!=e&&s.getAttribute(et.controlPointKind)&&a(i,t,()=>new Set)?.add(e)}for(const s of this.curveControlPointGraphics){const[e,o]=wt(s);if(i.get(e)?.has(o))continue;const r=t[e][o];if(I(r)||L(r)){const i=H(t[e][o-1]),n=I(r)?O(i,r):R(i,r),[a,h]=E(n,.25);s.geometry=new f({x:a,y:h,spatialReference:this._coordinateHelper.spatialReference})}else if(k(r)){const t=s.getAttribute(et.controlPointKind),[e,i]=t===st.bezier.cp1?r.b[1]:r.b[2];s.geometry=new f({x:e,y:i,spatialReference:this._coordinateHelper.spatialReference})}}for(const s of this.constructionLineGraphics){const i=s.getAttribute(et.controlPointKind),[o,r]=wt(s),n=t[o],a=H(n[r-1]),h=H(n[r]),p=t[o][r];i===st.bezier.line1?s.geometry=new b({paths:[[[a[0],a[1]],[...p.b[1]]]],spatialReference:e}):s.geometry=new b({paths:[[[h[0],h[1]],[...p.b[2]]]],spatialReference:e})}}_refreshGraphicIndicesAttributes(t){const{componentIndex:e,vertexIndex:i}=t,s=t=>{const[s,o]=wt(t);s===e&&o>=i&&t.setAttribute(et.pointIndex,o+1)};this.vertexGraphics.forEach(s),this.curveControlPointGraphics.forEach(s),this.constructionLineGraphics.forEach(s);for(const o of this.midpointGraphics){if(o.getAttribute(et.pathIndex)!==e)continue;const t=o.getAttribute(et.pointIndexStart);t>=i&&(o.setAttribute(et.pointIndexStart,t+1),o.setAttribute(et.pointIndexEnd,o.getAttribute(et.pointIndexEnd)+1))}}_getVertexFromEditGeometry(t){const[e,i]=wt(t);return l(this._editGeometryOperations),this._editGeometryOperations.data.parts[e].vertices[i]}_onHandleMove(t,e,s,o,r){p(this._snappingTask);const n=this._snappingContext;if(!n)return;const a=t.geometry,h="graphic-move-stop"===o.type;if(a&&S(a))if(null!=this.snappingManager&&this.selectedManipulators.length<2&&!h){const o=this.snappingManager;this._stagedVertex=o.update({point:a,context:n}),this._syncGeometryAfterVertexMove(t,new f(this._stagedVertex),e,s,h),r(),this._snappingTask=i(async i=>{const p=await o.snap({point:a,context:n,signal:i});p.valid&&(this._stagedVertex=p.apply(),this._syncGeometryAfterVertexMove(t,new f(this._stagedVertex),e,s,h),r())})}else{const i=null!=this._stagedVertex?new f(this._stagedVertex):a;this._syncGeometryAfterVertexMove(t,i,e,s,h),r()}else r()}_syncGeometryAfterVertexMove(t,e,i,s,o=!1){const r=this._editGeometryOperations?.data.geometry.clone();if(!r)return;const{_coordinateHelper:n}=this,a=n.pointToVector(e),h=this._getVertexFromEditGeometry(t);if(h){const t=n.getZ(a),e=a[0]-h.pos[0],i=a[1]-h.pos[1],s=null!=t?t-h.pos[2]:0;"point"!==r.type&&"mesh"!==r.type||this._editGeometryOperations?.moveVertices([h],e,i,s),this._connectedReshapeManager?.translate(e,i,s)}if("point"===r.type)t.geometry=e;else if("mesh"===r.type)t.geometry=r.centerAt(e);else{if(t!==this.graphic){const o=n.spatialReference,[a,h]=wt(t);let p=Gt(r);const l=n.pointToArray(e);this._updateGeometryFromGraphic(t,p,a,h,l,o,"polygon"===r.type),this._isVertex(t)||this._isCurveControlPoint(t)?(p=this._moveRelatedCoordinates(p,t,l),p=this._moveSelectedHandleCoordinates(p,t,i,s,"polygon"===r.type),this._updateMidpointGraphicLocations(p),this._updateCurveGraphicLocations(p)):this._isMidpoint(t)&&this._updateCurveGraphicLocations(p),ot(r,p)}this._updateGraphicGeometry(r),this._syncEditGeometryOperations(r),o&&(this._mover?this._mover.updateGeometry(this._mover.graphics.indexOf(t),e):t.geometry=e)}}_syncEditGeometryOperations(t){const e=this._editGeometryOperations?.trySetGeometry(t);e||(this._editGeometryOperations=null,this._setUpGeometryHelper())}_moveRelatedCoordinates(t,e,i){const{relatedGraphicIndices:s}=e.attributes,o=this._coordinateHelper.spatialReference;if(!s?.length)return t;for(const r of s){const s=this.vertexGraphics.at(r),[n,a]=wt(s);Ot(t,n,a,i,o),s.geometry=e.geometry}return t}_moveSelectedHandleCoordinates(t,e,i,s,o){const r=this._coordinateHelper.spatialReference;for(const n of this.selectedManipulators)if(n!==e){const[e,a]=wt(n),h=n.getAttribute(et.relatedGraphicIndices),p=D(n.geometry,i,s,this.view),l=C(p);if(n.geometry=p,this._updateGeometryFromGraphic(n,t,e,a,l,r,o),h?.length)for(const i of h){const e=this.vertexGraphics.at(i),[s,o]=wt(e);Ot(t,s,o,l,r),e.geometry=p}}return t}_updateGeometryFromGraphic(t,e,i,s,o,r,n){const a=e[i].length-1;this._isCurveControlPoint(t)?Mt(e,i,s,[o[0],o[1]],t.getAttribute(et.controlPointKind)):(Ot(e,i,s,o,r),n&&(0===s?Ot(e,i,a,o,r):s===a&&(e[i][0]=o)))}_onGraphicPointerOverCallback(t){const e=t.graphic;this._hoverGraphic=e;const i=this._isVertex(e);i&&!this._isSelected(e)?e.symbol=this.symbols.vertices.hover:this._isCurveControlPoint(e)&&!this._isSelected(e)&&(e.symbol=this.symbols.controlPoints.hover),this._updateTooltip(i?e:null),this._updateHoverCursor(e)}_onGraphicPointerOutCallback(t){const e=t.graphic;this._hoverGraphic=null,this._isVertex(e)&&!this._isSelected(e)&&(e.symbol=this.symbols.vertices.default),this._isCurveControlPoint(e)&&!this._isSelected(e)&&(e.symbol=this.symbols.controlPoints.default),this.removeHandles(_t),this._updateTooltip()}_handleMidpointClickOrStartMove(t){const{graphic:e}=t,i=this.graphic.geometry;if(null==i||"polygon"!==i.type&&"polyline"!==i.type)return[];const s=i.clone(),o=[],{[et.pathIndex]:r,[et.pointIndexStart]:n,[et.pointIndexEnd]:a}=e.attributes,h=C(e.geometry),p=0===a?n+1:a;e.attributes={[et.tool]:rt,[et.pathIndex]:r,[et.pointIndex]:p,[et.relatedGraphicIndices]:[]};const l=Gt(s),c=l[r][a];if(V(c)){if(this.enableCurveOnMidpoint&&t.viewEvent.native.shiftKey){const t=H(l[r][p]);l[r].splice(p,1,{c:[t,[h[0],h[1]]]}),e.setAttribute(et.controlPointKind,st.circle.interior),e.setAttribute(et.curveFromStraightEdgeFlag,!0),this.midpointGraphics.remove(e),this.curveControlPointGraphics.push(e),ot(s,l)}else l[r].splice(p,0,h),o.push({coordinates:l[r][p],componentIndex:r,vertexIndex:p})}else{const t=H(l[r][n]),e=nt(t,c,.5,this._coordinateHelper);l[r].splice(a,1,...e),o.push({coordinates:H(l[r][p]),componentIndex:r,vertexIndex:p})}return this._updateGraphicGeometry(s),this._syncEditGeometryOperations(s),o}_addToSelection(t){const e=It(t);for(const i of e)this._isCurveControlPoint(i)?i.symbol=this.symbols.controlPoints.selected:i.symbol=this.symbols.vertices.selected,this.selectedManipulators.add(i),this._updateTooltip(i);this._emitSelectEvent(e)}_removeFromSelection(t,e){if(this._isVertex(t)){const{vertices:i}=this.symbols;t.symbol=e?i.hover:i.default}else if(this._isCurveControlPoint(t)){const{controlPoints:i}=this.symbols;t.symbol=e?i.hover:i.default}this.selectedManipulators.remove(t),this._emitDeselectEvent([t]),this._updateTooltip()}_clearSelection(){const t=this.selectedManipulators.toArray(),{controlPoints:e,vertices:i}=this.symbols;if(t.length>0){for(const s of t)this._isVertex(s)?s.symbol=i.default:this._isCurveControlPoint(s)&&(s.symbol=e.default);this.selectedManipulators.removeAll(),this._emitDeselectEvent(t),this._updateTooltip()}}_keyDownHandler(t){null==this._activeOperationInfo&&yt(t,this.tooltip)||ct.delete.includes(t.key)&&!t.repeat&&this.selectedManipulators.length&&(this._removeVertices(this.selectedManipulators),t.stopPropagation())}_removeVertices(t){const e=this.graphic.geometry,i=this.vertexGraphics.length;if(null==e||"polygon"!==e.type&&"polyline"!==e.type&&"multipoint"!==e.type)return;if("polygon"===e.type&&i<4||"multipoint"===e.type&&i<2||"polyline"===e.type&&i<3)return;const s=this.graphic.clone(),o=e.clone();let r=Gt(o);const n=[],a=It(t);for(const h of a){if(this._isCurveControlPoint(h))continue;const{x:t,y:e}=h.geometry;for(let i=0;i<r.length;i++){const s=r[i];for(let o=0;o<s.length;o++){const[a,h]=H(s[o]);if(t===a&&e===h){n.push({coordinates:H(r[i][o]),componentIndex:i,vertexIndex:o}),r[i].splice(Number(o),1);const t=r[i][o];t&&!V(t)&&(r[i][o]=H(t))}}}}if("polygon"===o.type)r=r.filter(t=>{if(t.length<2)return!1;const[e,i]=H(t[0]),[s,o]=H(t[t.length-1]);return(2!==t.length||e!==s||i!==o)&&(e===s&&i===o||t.push(t[0]),!0)});else if("polyline"===o.type)for(const h of r)1===h.length&&r.splice(r.indexOf(h),1);ot(o,r),this._updateGraphicGeometry(o),this.refresh(),this._emitVertexRemoveEvent(a,s,n)}_isVertex(t){return this.vertexGraphics.includes(t)}_isCurveControlPoint(t){return this.curveControlPointGraphics.includes(t)}_isConstructionLine(t){return this.constructionLineGraphics.includes(t)}_isSelected(t){return(this._isVertex(t)||this.curveControlPointGraphics.includes(t))&&this.selectedManipulators.includes(t)}_isMidpoint(t){return this.midpointGraphics.includes(t)}_updateHoverCursor(t){const e=this._isMidpoint(t)?"copy":"move";this.addHandles(this.view.acquireCursor(e,"high"),_t)}_updateTooltip(t,e){let i=null;const{graphic:s,view:o,tooltipInfos:r}=this,n=s?.geometry;"point"===n?.type?i=r.movePoint:this._selectedManipulator?i=r.selectedVertex:t===this.graphic?(i=r.translateGraphic,B(i,o,this._tooltipsContext,e)):t&&this.selectedManipulators.length>1&&(i=r.translateVertices,J(i,o,n,this._tooltipsContext,this._updatingHandles,e)),this.activeTooltipInfo=i}_updateGraphicGeometry(t){this._updateHandlesOnExternalGeometryChange?.pause(),this.graphic.geometry=t,this._updateHandlesOnExternalGeometryChange?.resume()}_emitMoveStartEvent(t,e){const i={type:"move-start",mover:this.graphic,dx:t,dy:e};this.emit("move-start",i),this.callbacks.onMoveStart?.(i)}_emitMoveEvent(t,e){const i={type:"move",mover:this.graphic,dx:t,dy:e};this.emit("move",i),this.callbacks.onMove?.(i)}_emitMoveStopEvent(t,e){if(null==t||null==e){const i=this._activeOperationInfo;if(!i)return;t=i.totalDx,e=i.totalDy}const i={type:"move-stop",mover:this.graphic,dx:t,dy:e};this.emit("move-stop",i),this.callbacks.onMoveStop?.(i)}_emitReshapeStartEvent(t){const e={type:"reshape-start",graphic:this.graphic,mover:t,selected:this.selectedManipulators.toArray()};this.emit("reshape-start",e),this.callbacks.onReshapeStart?.(e)}_emitReshapeEvent(t){const e={type:"reshape",graphic:this.graphic,mover:t,selected:this.selectedManipulators.toArray()};this.emit("reshape",e),this.callbacks.onReshape?.(e)}_emitReshapeStopEvent(t){const e={type:"reshape-stop",graphic:this.graphic,mover:t,selected:this.selectedManipulators.toArray()};this.emit("reshape-stop",e),this.callbacks.onReshapeStop?.(e)}_emitSelectEvent(t){const e={type:"vertex-select",added:t};this.emit("select",e),this.callbacks.onVertexSelect?.(e)}_emitDeselectEvent(t){const e={type:"vertex-deselect",removed:t};this.emit("deselect",e),this.callbacks.onVertexDeselect?.(e)}_emitVertexAddEvent(t,e,i){const s={type:"vertex-add",added:t,graphic:this.graphic,oldGraphic:e,vertices:i};this.emit("vertex-add",s),this.callbacks.onVertexAdd?.(s)}_emitVertexRemoveEvent(t,e,i){const s={type:"vertex-remove",removed:t,graphic:this.graphic,oldGraphic:e,vertices:i};this.emit("vertex-remove",s),this.callbacks.onVertexRemove?.(s)}_logGeometryTypeError(){n.getLogger(this).error(new o("reshape:invalid-geometry","Reshape operation not supported for the provided graphic. The geometry type is not supported."))}};function bt(t){const e=Gt(t.clone());if("polygon"===t.type)for(const i of e){const t=i[i.length-1];if(!V(t))continue;const e=i[0];e[0]===t[0]&&e[1]===t[1]&&i.length>2&&i.pop()}return e}function Gt(t){return"polygon"===t.type?t.curveRings?.slice()??t.rings.slice():"polyline"===t.type?t.curvePaths?.slice()??t.paths.slice():t.points.map(t=>[t])}function xt(t,e,i,s){const o=t[e][i];if(I(o))o.c[1]=s;else if(L(o)){const o=H(t[e][i]);t[e][i]={c:[o,s]}}}function Mt(t,e,i,s,o){switch(o){case st.circle.interior:xt(t,e,i,s);break;case st.bezier.cp1:t[e][i].b[1]=s;break;case st.bezier.cp2:t[e][i].b[2]=s}}function Ct(t,e){return t<1e-8*e}function St(t,{cx:e,cy:i,isInvalid:s,thetaStart:o,thetaEnd:r},n,a){const[h,p]=t,[l,c]=n,d=l-h,m=c-p;e-=h,i-=p;const u=a?o>r:o<r,[v,y]=s?[e,i]:u?[-i,e]:[i,-e],[_,g]=[d,m],[f,b]=[v,y],G=_*b-g*f,x=(d**2+m**2)/2;if(Ct(Math.abs(G),x))return[(h+l)/2,(p+c)/2];const[M,C]=[b/G*x,-f/G*x],S=M**2+C**2,[E,O]=[d/2-M,m/2-C];if(Ct(E**2+O**2,S)){const[t,e]=u?[-C,M]:[C,-M];return[t+M+h,e+C+p]}const w=Math.sqrt((M**2+C**2)/(E**2+O**2))*Math.sign(d*v+m*y);return[E*w+M+h,O*w+C+p]}function Et(t,e,i){const s=G(new b({curvePaths:[[t,e]],spatialReference:i})),{curvePaths:o}=x(s,i),r=o[0][1];return P(r)?r:w(t,r)}function Ot(t,e,i,s,o){const r=t[e][i],n=t[e].at(i+1);if(at(t,e)){const i=t[e][1];return t[e][0]=[...s],void(t[e][1]={a:[[...s],[...i.a[1]],0,0]})}if(ht(t,e)){const i=t[e][1],[o,r]=i.a[1],[n,a]=s,h=Math.hypot(n-o,a-r),[p,l]=[n-o,a-r],c=T(l,p);return t[e][0]=[...s],void(t[e][1]={a:[[...s],[...i.a[1]],0,0,c,h,i.a[6]]})}const a=H(r);if(V(r))r.splice(0,r.length,...s);else if(k(r))r.b[0].splice(0,r.b[0].length,...s);else if(I(r)||L(r)){const o=H(t[e][i-1]),n=I(r)?O(o,r):R(o,r);t[e].splice(i,1,{c:[[...s],St(o,n,s,!0)]})}else if(P(r)){r.a[0].splice(0,r.a[0].length,...s);const n=H(t[e][i-1]);r.a=Et(n,r,o).a}if(n&&!V(n)&&!k(r))if(I(n)||L(n)){const o=H(n),r=I(n)?O(a,n):R(a,n);t[e].splice(i+1,1,{c:[o,St(o,r,s,!1)]})}else if(P(n)){const t=H(r);n.a=Et(t,n,o).a}}function wt({attributes:t}){return[t?.[et.pathIndex]||0,t?.[et.pointIndex]||0]}function Ht({attributes:t}){return`${t?.[et.pathIndex]}-${t?.[et.pointIndex]}`}function It(t){return t instanceof e?[t]:[...t]}function Lt(t){const e=t.sourceLayer??t.layer;return q(e)?{graphic:t,layer:e}:null}function kt(t){return t.toArray().map(({attributes:t})=>({pathIndex:t[et.pathIndex],vertexIndex:t[et.pointIndex]}))}t([y()],ft.prototype,"_activeOperationInfo",void 0),t([y()],ft.prototype,"_connectedReshapeManager",void 0),t([y()],ft.prototype,"_coordinateHelper",null),t([y()],ft.prototype,"_editGeometryOperations",void 0),t([y()],ft.prototype,"_segmentLabels",void 0),t([y()],ft.prototype,"test",null),t([y()],ft.prototype,"_segmentLabelsImportTask",void 0),t([y()],ft.prototype,"_updatingHandles",void 0),t([y()],ft.prototype,"_selectedManipulator",null),t([y()],ft.prototype,"_tooltipsContext",null),t([y()],ft.prototype,"callbacks",void 0),t([y()],ft.prototype,"connectedReshapeProviders",void 0),t([y()],ft.prototype,"enableMidpoints",void 0),t([y()],ft.prototype,"enableCurveOnMidpoint",void 0),t([y()],ft.prototype,"enableMovement",void 0),t([y()],ft.prototype,"enableVertices",void 0),t([y()],ft.prototype,"graphic",void 0),t([y()],ft.prototype,"highlightName",void 0),t([y()],ft.prototype,"highlightsEnabled",void 0),t([y()],ft.prototype,"layer",void 0),t([y()],ft.prototype,"snappingManager",void 0),t([y({readOnly:!0})],ft.prototype,"state",null),t([y()],ft.prototype,"symbols",void 0),t([y()],ft.prototype,"tooltip",void 0),t([y()],ft.prototype,"tooltipInfos",void 0),t([y()],ft.prototype,"activeTooltipInfo",void 0),t([y({constructOnly:!0})],ft.prototype,"automaticAreaMeasurementUtils",void 0),t([y({constructOnly:!0})],ft.prototype,"automaticLengthMeasurementUtils",void 0),t([y()],ft.prototype,"updating",null),t([y({type:mt})],ft.prototype,"sketchOptions",void 0),t([y({readOnly:!0})],ft.prototype,"type",void 0),t([y({readOnly:!0})],ft.prototype,"vertexGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"curveControlPointGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"constructionLineGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"midpointGraphics",void 0),t([y({readOnly:!0})],ft.prototype,"selectedManipulators",void 0),t([y()],ft.prototype,"view",void 0),ft=t([_("esri.views.draw.support.Reshape")],ft);const Vt=ft;export{Vt as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{handlesGroup as t}from"../../../core/handleUtils.js";import{
|
|
5
|
+
import{handlesGroup as t}from"../../../core/handleUtils.js";import{debounce as e}from"../../../core/promiseUtils.js";import{zeroMeters as o}from"../../../core/quantity.js";import{watch as i,syncAndInitial as n,sync as r}from"../../../core/reactiveUtils.js";import{createScreenPoint as a}from"../../../core/screenUtils.js";import c from"../../../geometry/Point.js";import{isCurvedGeometry as s}from"../../../geometry/support/curves/curveUtils.js";import{connectPasteEvent as l,getXYZDeltasFromTooltipInfo as p}from"../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as m}from"../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{SelectedVertexTooltipInfo as f}from"../../interactive/tooltip/infos/SelectedVertexTooltipInfo.js";import{TranslateTooltipInfo as u}from"../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateVertexTooltipInfo as y}from"../../interactive/tooltip/infos/TranslateVertexTooltipInfo.js";import{elevationFromPoint as v}from"../../support/euclideanLengthMeasurementUtils.js";function g(t){const e={sketchOptions:t,viewType:"2d"};return{movePoint:new m(e),selectedVertex:new f(e),translateGraphic:new u(e),translateVertices:new y(e)}}function h(o,a,c){function s(){const t=a(),e=t.sketchOptions.tooltips.effectiveEnabled?t.activeTooltipInfo:null;return{...t,activeTooltipInfo:e}}let p=!1;function m(t){p||(p=!0,t(),p=!1)}const f=e(t=>x(t)),u=t=>{m(()=>{d(t),o.info=t.activeTooltipInfo,c.addPromise(f(t)).catch(()=>{})})};return t([i(()=>{const t=s();return{context:t,geometry:t.graphic?.geometry,vertexGeometry:t.selectedVertex?.geometry}},({context:t})=>u(t),n),i(()=>{const t=s(),{activeTooltipInfo:e}=t;if(e&&"key"in e)return{context:t,key:e.key}},(t,e)=>{t&&e&&t.key!==e.key&&m(()=>L(t.context))},r),l(o,{onBeforePaste:()=>{p=!0},onAfterPaste:()=>{L(s()),p=!1}})])}function d(t){const e=t.activeTooltipInfo;if(e)switch(e.sketchOptions=t.sketchOptions,e?.type){case"move-point":T(e,t);break;case"selected-vertex":w(e,t)}}async function x(t){const e=t.activeTooltipInfo;if("selected-vertex"===e?.type)return await j(e,t)}function T(t,{graphic:e}){k(t,e,e?.geometry)}function w(t,{graphic:e,selectedVertex:o,automaticLengthMeasurementUtils:i}){k(t,e,o?.geometry);const n=e?.geometry;if(!n||!s(n))switch(n?.type){case"polygon":t.geometryType="polygon",t.totalLength.visible=!1;break;case"polyline":t.geometryType="polyline",t.totalLength.actual=i.autoLength2D(n),t.area.visible=!1;break;case"multipoint":t.geometryType="multipoint",t.area.visible=!1,t.totalLength.visible=!1}}async function j(t,{graphic:e,automaticAreaMeasurementUtils:o}){const i=e?.geometry;if("polygon"===i?.type)t.area.actual=await o.autoArea2D(i)}function k(t,e,o){e&&"point"===o?.type&&(t.setLocationFromPoint(o),t.elevation.actual=v(o),t.elevation.visible=!!e.geometry?.hasZ,t.elevation.readOnly=!1,t.elevation.showAsZ=!0)}function L(t){function e(e,o){const i=o?.geometry;if(!i||"point"!==i.type)return;const{dx:n,dy:r,dz:a}=p(e,i);if(0===n&&0===r&&0===a)return;const{x:s,y:l,z:m,m:f,spatialReference:u}=i,y=new c({x:s+n,y:l+r,z:null!=m?m+a:void 0,m:f,spatialReference:u});t.updateGeometry(o,y,i,n,r)}const{activeTooltipInfo:o,graphic:i,selectedVertex:n}=t;switch(o?.type){case"move-point":return e(o,i);case"selected-vertex":return e(o,n)}}function U(t,e,o,i){t.clear(),M(t,e,i,o)}function I(t,e,i,n,r,a){if(i&&s(i))return void t.clear();t.distance=o,t.elevation=null,t.totalLength=null;const{automaticLengthMeasurementUtils:c}=n;if("polyline"===i?.type)t.totalLength=c.autoLength2D(i);M(t,e,a,n),r.addPromise(b(t,i,n)).catch(()=>{})}const b=e(async(t,e,{automaticAreaMeasurementUtils:o})=>{if("polygon"===e?.type)t.area=await o.autoArea2D(e);else t.area=null});function M(t,e,i,{automaticLengthMeasurementUtils:n}){if(!i)return;const{x:r,y:c}=i.origin,s=e.toMap(i),l=e.toMap(a(r,c)),p=n.autoDistanceBetweenPoints2D(l,s);t.distance=null!=p?p:o}export{h as connectTooltip,g as createTooltipInfos,U as updateTranslateTooltipInfo,I as updateTranslateVertexTooltipInfo};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{debounce as e}from"../../../core/promiseUtils.js";import{valueInUnit as t,zeroMeters as o,createLength as n,zeroDegreesGeographic as i,zeroSquareMeters as r}from"../../../core/quantity.js";import{getMetersPerVerticalUnitForSR as a}from"../../../core/units.js";import{ensureType as c}from"../../../core/accessorSupport/ensureType.js";import s from"../../../geometry/Point.js";import{absoluteHeightElevationInfo as l,getConvertedElevationFromXYZ as p}from"../../../support/elevationInfoUtils.js";import{getDrawHelpMessage as u}from"./helpMessageUtils.js";import{getDrawMeshHelpMessage as m}from"./helpMessageUtils3d.js";import{getConstraintContext as d}from"../../interactive/sketch/constraintUtils.js";import{updateTooltipInfoFromMeshTransform as f}from"../../interactive/tooltip/tooltipCommonUtils.js";import{DrawCircleTooltipInfo as y}from"../../interactive/tooltip/infos/DrawCircleTooltipInfo.js";import{DrawMeshTooltipInfo as g}from"../../interactive/tooltip/infos/DrawMeshTooltipInfo.js";import{DrawMultipointTooltipInfo as w}from"../../interactive/tooltip/infos/DrawMultipointTooltipInfo.js";import{DrawPointTooltipInfo as h}from"../../interactive/tooltip/infos/DrawPointTooltipInfo.js";import{DrawPolygonTooltipInfo as v}from"../../interactive/tooltip/infos/DrawPolygonTooltipInfo.js";import{DrawPolylineTooltipInfo as O}from"../../interactive/tooltip/infos/DrawPolylineTooltipInfo.js";import{DrawRectangleTooltipInfo as k}from"../../interactive/tooltip/infos/DrawRectangleTooltipInfo.js";import{directionForVertices as M}from"../../support/angularMeasurementUtils.js";import{elevationFromZ as x}from"../../support/euclideanLengthMeasurementUtils.js";function D(e,t){return{point:new h({sketchOptions:t,viewType:e}),multipoint:new w({sketchOptions:t,viewType:e}),polyline:new O({sketchOptions:t,viewType:e}),polygon:new v({sketchOptions:t,viewType:e}),mesh:new g({sketchOptions:t,viewType:e}),rectangle:new k({sketchOptions:t}),circle:new y({sketchOptions:t})}}function j(e){const{directionOptions:t,geometryType:o,sketchOptions:n,tooltipInfos:i}=e,r=t=>{const o=$(e).mode,n=i[t].elevation;"relative-to-ground"===o||"relative-to-scene"===o||"on-the-ground"===o?n.lock(ee(e)):n.unlock()},a=e=>{if(t){const o=i[e].direction;o.committed=t.angle,o.unlockOnVertexPlacement=!1,n.values.directionMode=t.mode}};switch(o){case"polygon":case"polyline":r(o),a(o);break;case"point":case"mesh":r(o)}}function T(e,t){const{drawOperation:o,view:n}=t,i=U(t),r=$(t);if("2d"===n.type||!e||"absolute-height"!==r.mode||1!==o?.numCommittedVertices||!i||"draw-polyline"!==i.type&&"draw-polygon"!==i.type||i.elevation.locked)return;const[a,c,s]=e,l=W(a,c,s,r,t);null!=l&&i.elevation.lock(l)}function P(e){U(e)?.allFields.forEach(e=>{e.unlockOnVertexPlacement&&e.unlock()})}function U({geometryType:e,graphic:t,tooltipInfos:o}){return t?.geometry?.type!==b[e]?"circle"===e||"rectangle"===e?o[e]:null:o[e]}const b={point:"point",multipoint:"multipoint",mesh:"mesh",polyline:"polyline",polygon:"polygon",circle:"polygon",rectangle:"polygon",freehandPolygon:"polygon",freehandPolyline:"polyline",text:"point"};function I(e,t,o){switch(e?.type){case"draw-point":V(e,t);break;case"draw-multipoint":G(e,t);break;case"draw-polyline":z(e,t);break;case"draw-polygon":F(e,t);break;case"draw-rectangle":H(e,t);break;case"draw-circle":q(e,t);break;case"draw-mesh":S(e,t)}o.addPromise(L(e,t)).catch(()=>{})}const L=e(async(e,t)=>{switch(e?.type){case"draw-polygon":return await A(e,t);case"draw-rectangle":return await R(e,t);case"draw-circle":return await X(e,t)}});function V(e,t){const o=t.graphic?.geometry;"point"===o?.type&&(Z(e,t),e.helpMessage=u("point",o,t.drawOperation.drawingMode))}function G(e,t){const o=t.graphic?.geometry;"multipoint"===o?.type&&(Z(e,t),e.helpMessage=u("multipoint",o,t.drawOperation.drawingMode))}function S(e,t){const{graphic:o,view:n}=t,i=o?.geometry;"3d"!==n.type||i&&"mesh"!==i.type||(Z(e,t),i&&f(e,i),e.helpMessage=m(o,n))}function Z(e,t){const{drawOperation:o,view:n,sketchOptions:i}=t,{cursorVertex:r,hasZ:a}=o;e.sketchOptions=i,e.viewType=n.type,e.setLocationFromPoint(r,_(t)),e.setElevationFromPoint(r,{hasZ:a}),o.constraints=r?{context:te(r,t),x:e.x.committed,y:e.y.committed,longitude:e.longitude.committed,latitude:e.latitude.committed,elevation:e.elevation.committed,distance:null,direction:null}:void 0}function z(e,t){const{createOperationGeometry:n,drawOperation:i,automaticLengthMeasurementUtils:r}=t,a=null!=n?n.full:null;a&&"polyline"!==a.type||(C(e,t),e.totalLength.actual=i.lastVertex?(a?r.autoLength2D(a):null)??o:null,e.helpMessage=u("polyline",a,t.drawOperation.drawingMode))}function F(e,t){const{createOperationGeometry:o}=t,n=null!=o?o.full:null;n&&"polygon"!==n.type||(C(e,t),e.helpMessage=u("polygon",n,t.drawOperation.drawingMode))}async function A(e,t){const{createOperationGeometry:o,drawOperation:n}=t,i=null!=o?o.full:null;i&&"polygon"!==i.type||(n.lastVertex?e.area.actual=i?await t.automaticAreaMeasurementUtils.autoArea2D(i)??r:r:e.area.actual=null)}const B=c(s);function C(e,t){const{drawOperation:n,sketchOptions:r,view:a,automaticLengthMeasurementUtils:c}=t,{cursorVertex:s,lastVertex:l,secondToLastVertex:p,hasZ:u}=n,m=r.values.effectiveDirectionMode;e.sketchOptions=r,e.viewType=a.type;const d=l&&s?c.autoDistanceBetweenPoints2D(B(l),B(s))??o:null;e.distance.actual=d,e.distance.readOnly=null==l;const f=null!==l&&("absolute"===m||p);if(e.direction.actual=null,e.direction.readOnly=!f,f&&s){const t=M(p,l,s,m);e.direction.actual=t??i}e.setLocationFromPoint(s,_(t)),e.setElevationFromPoint(s,{hasZ:u});const y=E(l,t);e.xyMode=y,e.direction.visible="direction-distance"===y,e.distance.visible="direction-distance"===y,e.effectiveX.visible="coordinates"===y,e.effectiveY.visible="coordinates"===y;const g=s??l;n.constraints=g?{context:te(g,t),x:e.x.committed,y:e.y.committed,longitude:e.longitude.committed,latitude:e.latitude.committed,elevation:e.elevation.committed,distance:e.distance.committed,direction:e.direction.committed}:void 0}function E(e,{sketchOptions:t}){const o=t.tooltips.xyMode;return"auto"===o?e?"direction-distance":"coordinates":o}function H(e,t){e.sketchOptions=t.sketchOptions,e.xSize=J(t),e.ySize=K(t),e.helpMessage=u("rectangle",t.graphic?.geometry,t.drawOperation.drawingMode)}async function R(e,t){e.area=await Y(t)}function q(e,t){const{forceUniformSize:o,sketchOptions:n}=t;e.sketchOptions=n,e.radius=o?N(t):null,e.xSize=o?null:J(t),e.ySize=o?null:K(t),e.helpMessage=u("circle",t.graphic?.geometry,t.drawOperation.drawingMode)}async function X(e,t){e.area=await Y(t)}async function Y({createOperationGeometry:e,automaticAreaMeasurementUtils:t}){const o=e?.full;return"polygon"!==o?.type?r:await t.autoArea2D(o)??r}function J({createOperationGeometry:e,automaticLengthMeasurementUtils:t}){const n=e?.rectangle?.midpoints;return(null!=n?t.autoDistanceBetweenPoints2D(n.left,n.right):null)??o}function K({createOperationGeometry:e,automaticLengthMeasurementUtils:t}){const n=e?.rectangle?.midpoints;return(null!=n?t.autoDistanceBetweenPoints2D(n.top,n.bottom):null)??o}function N({createOperationGeometry:e,automaticLengthMeasurementUtils:t}){return(null!=e?.circle?.center&&null!=e.circle.edge?t.autoDistanceBetweenPoints2D(e.circle.center,e.circle.edge):null)??o}function Q(e){const{geometryType:o,tooltipInfos:n}=e;switch(o){case"point":case"multipoint":case"mesh":case"polyline":case"polygon":{const i=n[o].elevation.committed;if(!i)return;return t(i,"meters")/a(_(e))}default:return}}function W(e,t,o,n,i){const{view:r,drawOperation:a}=i;if("3d"!==r.type||!a)return;o??=0;const c=_(i),s=$(i),l=p(r,e,t,o,c,s,n);return x(l,c)??ee(i)}function $(e){return e.drawOperation.elevationInfo??l}function _(e){return e.drawOperation.coordinateHelper.spatialReference}function ee(e){const t=a(_(e));return n(e.defaultZ*t,"meters")}function te(e,t){return d(e,t.view,_(t),$(t),t.drawOperation.coordinateHelper.hasZ(),t.sketchOptions.values.effectiveDirectionMode)}export{D as createTooltipInfos,U as getActiveTooltipInfo,Q as getConstraintZ,j as initializeConstraints,T as lockElevationOnVertexAdd,P as unlockConstraintsOnVertexAddOrRemove,I as updateTooltipInfo};
|
|
@@ -13,18 +13,21 @@ export default abstract class Units extends Accessor {
|
|
|
13
13
|
* Area units.
|
|
14
14
|
*
|
|
15
15
|
* @default null
|
|
16
|
+
* @beta
|
|
16
17
|
*/
|
|
17
18
|
accessor area: SystemOrAreaUnit | null | undefined;
|
|
18
19
|
/**
|
|
19
20
|
* Length units.
|
|
20
21
|
*
|
|
21
22
|
* @default null
|
|
23
|
+
* @beta
|
|
22
24
|
*/
|
|
23
25
|
accessor length: SystemOrLengthUnit | null | undefined;
|
|
24
26
|
/**
|
|
25
27
|
* Vertical length units.
|
|
26
28
|
*
|
|
27
29
|
* @default null
|
|
30
|
+
* @beta
|
|
28
31
|
*/
|
|
29
32
|
accessor verticalLength: SystemOrLengthUnit | null | undefined;
|
|
30
33
|
}
|
|
@@ -20,7 +20,6 @@ export interface HighlightLayerViewMixinProperties {
|
|
|
20
20
|
* @since 4.26
|
|
21
21
|
* @see [highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-HighlightLayerViewMixin.html#highlight)
|
|
22
22
|
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
23
|
-
* @see [Sample: Highlight point features](https://developers.arcgis.com/javascript/latest/sample-code/highlight-point-features/)
|
|
24
23
|
* @example
|
|
25
24
|
* // Features in the layerview will be highlighted with bright
|
|
26
25
|
* // yellow colors in the map.
|
|
@@ -57,7 +56,6 @@ export abstract class HighlightLayerViewMixin {
|
|
|
57
56
|
* @since 4.26
|
|
58
57
|
* @see [highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-HighlightLayerViewMixin.html#highlight)
|
|
59
58
|
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
60
|
-
* @see [Sample: Highlight point features](https://developers.arcgis.com/javascript/latest/sample-code/highlight-point-features/)
|
|
61
59
|
* @example
|
|
62
60
|
* // Features in the layerview will be highlighted with bright
|
|
63
61
|
* // yellow colors in the map.
|
|
@@ -88,7 +86,7 @@ export abstract class HighlightLayerViewMixin {
|
|
|
88
86
|
* @returns Returns a highlight handler with a `remove()` method that can be called to remove the highlight.
|
|
89
87
|
* @see [View#highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#highlights)
|
|
90
88
|
* @see [Sample: Highlight features by geometry](https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/)
|
|
91
|
-
* @see [Sample: Highlight
|
|
89
|
+
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
92
90
|
* @example
|
|
93
91
|
* // Highlight features based on a query result
|
|
94
92
|
*
|
|
@@ -20,7 +20,6 @@ export interface ImageryLayerViewMixinProperties {
|
|
|
20
20
|
* @since 4.26
|
|
21
21
|
* @see [ImageryLayerView#highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ImageryLayerView.html#highlight)
|
|
22
22
|
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
23
|
-
* @see [Sample: Highlight point features](https://developers.arcgis.com/javascript/latest/sample-code/highlight-point-features/)
|
|
24
23
|
* @example
|
|
25
24
|
* // Features in the layerview will be highlighted with bright
|
|
26
25
|
* // yellow colors in the map.
|
|
@@ -50,7 +49,6 @@ export abstract class ImageryLayerViewMixin {
|
|
|
50
49
|
* @since 4.26
|
|
51
50
|
* @see [ImageryLayerView#highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ImageryLayerView.html#highlight)
|
|
52
51
|
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
53
|
-
* @see [Sample: Highlight point features](https://developers.arcgis.com/javascript/latest/sample-code/highlight-point-features/)
|
|
54
52
|
* @example
|
|
55
53
|
* // Features in the layerview will be highlighted with bright
|
|
56
54
|
* // yellow colors in the map.
|
|
@@ -95,7 +93,7 @@ export abstract class ImageryLayerViewMixin {
|
|
|
95
93
|
* @returns Returns a highlight handler with a `remove()` method that
|
|
96
94
|
* can be called to remove the highlight.
|
|
97
95
|
* @see [View#highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#highlights)
|
|
98
|
-
* @see [Sample: Highlight
|
|
96
|
+
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
99
97
|
* @example
|
|
100
98
|
* // Highlight features based on a query result
|
|
101
99
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Graphic from "../../Graphic.js";
|
|
2
2
|
import type Collection from "../../core/Collection.js";
|
|
3
|
+
import type KMLMapImage from "../../layers/support/KMLMapImage.js";
|
|
3
4
|
import type LayerView from "./LayerView.js";
|
|
4
|
-
import type { KMLMapImage } from "../../layers/support/KMLMapImage.js";
|
|
5
5
|
import type { LayerViewProperties } from "./LayerView.js";
|
|
6
6
|
|
|
7
7
|
export interface KMLLayerViewProperties extends LayerViewProperties {}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type MediaLayer from "../../layers/MediaLayer.js";
|
|
2
|
+
import type MediaLayerInteractionOptions from "../3d/layers/support/MediaLayerInteractionOptions.js";
|
|
2
3
|
import type { ResourceHandle } from "../../core/Handles.js";
|
|
3
4
|
import type { MediaElement } from "../../layers/support/media.js";
|
|
4
|
-
import type { MediaLayerInteractionOptions, MediaLayerInteractionOptionsProperties } from "../3d/layers/support/MediaLayerInteractionOptions.js";
|
|
5
5
|
import type { LayerViewHighlightOptions } from "./types.js";
|
|
6
|
+
import type { MediaLayerInteractionOptionsProperties } from "../3d/layers/support/MediaLayerInteractionOptions.js";
|
|
6
7
|
|
|
7
8
|
export interface MediaLayerViewMixinProperties extends Partial<Pick<MediaLayerViewMixin, "interactive" | "selectedElement">> {
|
|
8
9
|
/**
|
|
@@ -85,7 +86,7 @@ export abstract class MediaLayerViewMixin {
|
|
|
85
86
|
* @returns Returns a highlight handler with a `remove()` method that
|
|
86
87
|
* can be called to remove the highlight.
|
|
87
88
|
* @see [SceneView#highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlights)
|
|
88
|
-
* @see [Sample: Highlight
|
|
89
|
+
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
89
90
|
* @example
|
|
90
91
|
* // Add a new set of highlight options to the highlights collection
|
|
91
92
|
* const highlightName = "mark";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../../core/accessorSupport/decorators.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../../core/accessorSupport/decorators.js";import r from"../3d/layers/support/MediaLayerInteractionOptions.js";const i=i=>{const s=i;let n=class extends s{constructor(...t){super(...t),this.layer=null,this.interactive=!1,this.interactionOptions=new r,this.selectedElement=null}highlight(t,e){throw new Error("missing implementation")}};return t([e()],n.prototype,"layer",void 0),t([e()],n.prototype,"interactive",void 0),t([e({type:r})],n.prototype,"interactionOptions",void 0),t([e()],n.prototype,"selectedElement",void 0),n=t([o("esri.views.layers.MediaLayerViewMixin")],n),n};export{i as MediaLayerViewMixin};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{createArea as o}from"../../core/quantity.js";import r from"../../geometry/Polygon.js";import{l as t,e}from"../../chunks/geodeticAreaOperator.js";async function n({polygon:n,options:s}){await t();const i=r.fromJSON(n),a=s?.unit??"square-meters",m={unit:a,...s},p=e(i,m);return o(p,a)}export{n as geodesicArea};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{WorkerHandle as e}from"../../core/workers/WorkerHandle.js";class o extends e{constructor(){super("GeodesicMeasurementWorker","geodesicArea",{},void 0,{strategy:"distributed"})}geodesicArea(e,o,r){return this.invokeMethod("geodesicArea",{polygon:e.toJSON(),options:o},r)}}export{o as GeodesicMeasurementWorkerHandle};
|
|
@@ -81,7 +81,6 @@ export interface HighlightOptionsProperties extends Partial<Pick<HighlightOption
|
|
|
81
81
|
* @see [SceneLayerView#highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#highlight)
|
|
82
82
|
* @see [Sample: Highlight features by geometry](https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/)
|
|
83
83
|
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
84
|
-
* @see [Sample: Highlight point features](https://developers.arcgis.com/javascript/latest/sample-code/highlight-point-features/)
|
|
85
84
|
* @example
|
|
86
85
|
* // Override the default highlights collection
|
|
87
86
|
* const view = new MapView({
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Logger.js";import{makeScheduleFunction as r}from"../3d/layers/support/makeScheduleFunction.js";import{TextureCompressionWorkerHandle as o}from"./TextureCompressionWorkerHandle.js";import
|
|
5
|
+
import e from"../../core/Logger.js";import{makeScheduleFunction as r}from"../3d/layers/support/makeScheduleFunction.js";import{TextureCompressionWorkerHandle as o}from"./TextureCompressionWorkerHandle.js";import t from"../webgl/Texture.js";const n=new Set,s=()=>e.getLogger("esri/views/support/TextureCompressionHelper");function i(e,i){return t.compressionWorkerHandle??=new o(r(i)),n.has(e)?s().warn("Repeated texture compression worker initialization by the same view."):n.add(e),t.compressionWorkerHandle}function p(e){const r=t.compressionWorkerHandle;r&&(n.delete(e)||s().warn("Unknown view attempted to destroy the texture compression worker."),n.size||(r.destroyWorkerAndSelf(),t.compressionWorkerHandle=null))}export{p as destroyTextureCompressionWorker,i as initializeTextureCompressionWorker};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createEuclideanPlanarAreaCache as e,euclideanHorizontalPlanarArea as
|
|
5
|
+
import{createEuclideanPlanarAreaCache as e,euclideanHorizontalPlanarArea as r,euclideanPlanarArea as t}from"./euclideanAreaMeasurementUtils.js";import{GeodesicMeasurementWorkerHandle as n}from"./GeodesicMeasurementWorkerHandle.js";const o=n=>({async autoAreaByElevationMode(o,a,i=e(),s){if("on-the-ground"===a){const e=o.spatialReference;return e.isGeographic||e.isWebMercator?await n(o,{unit:"square-meters",curveType:"geodesic"},s):r(o,i)}return t(o,i)},async autoArea2D(r,t=e(),n){return this.autoAreaByElevationMode(r,"on-the-ground",t,n)}});let a=null;async function i(){if(!a){const e=new n;a=o(e.geodesicArea.bind(e))}return a}export{i as loadAutomaticAreaMeasurementUtils};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../request.js";import e from"../../geometry/Point.js";import{execute as r}from"../../geometry/operators/projectOperator.js";import{projectResolution as i,getProjectionOffsetGrid as a,load as s}from"../../layers/raster/functions/rasterProjectionHelper.js";import{isImageSource as n,rasterize as o}from"../2d/engine/Bitmap.js";import m from"../2d/engine/webgl/VertexStream.js";import{createProgramTemplate as c}from"../2d/engine/webgl/shaders/MaterialPrograms.js";import{PixelType as p}from"../webgl/enums.js";import{FramebufferObject as h}from"../webgl/FramebufferObject.js";import{createTransformTexture as x}from"../webgl/rasterUtils.js";import{RenderingContext as d}from"../webgl/RenderingContext.js";import{RenderingContextOptions as u}from"../webgl/RenderingContextOptions.js";import
|
|
5
|
+
import t from"../../request.js";import e from"../../geometry/Point.js";import{execute as r}from"../../geometry/operators/projectOperator.js";import{projectResolution as i,getProjectionOffsetGrid as a,load as s}from"../../layers/raster/functions/rasterProjectionHelper.js";import{isImageSource as n,rasterize as o}from"../2d/engine/Bitmap.js";import m from"../2d/engine/webgl/VertexStream.js";import{createProgramTemplate as c}from"../2d/engine/webgl/shaders/MaterialPrograms.js";import{PixelType as p}from"../webgl/enums.js";import{FramebufferObject as h}from"../webgl/FramebufferObject.js";import{createTransformTexture as x}from"../webgl/rasterUtils.js";import{RenderingContext as d}from"../webgl/RenderingContext.js";import{RenderingContextOptions as u}from"../webgl/RenderingContextOptions.js";import g from"../webgl/Texture.js";import{TextureDescriptor as _}from"../webgl/TextureDescriptor.js";class f{static{this._instanceRefCount=0}constructor(t){if(this._ownsRctx=!1,t)this._ownsRctx=!1,this._rctx=t;else{if(f._instance)return f._instanceRefCount++,f._instance;f._instanceRefCount=1,f._instance=this,this._ownsRctx=!0;const t=document.createElement("canvas").getContext("webgl2");t.getExtension("OES_texture_float"),this._rctx=new d(t,new u)}this._quad=new m(this._rctx,[0,0,1,0,0,1,1,1]);const e=c("raster/reproject","raster/reproject",{applyProjection:!0,bilinear:!1,bicubic:!1});this._program=this._rctx.programCache.acquire(e.vertexShader,e.fragmentShader,this._quad.locations),this._rctx.useProgram(this._program),this._program.setUniform1f("u_opacity",1),this._program.setUniform1i("u_image",0),this._program.setUniform1i("u_flipY",0),this._program.setUniform1i("u_transformGrid",1)}reprojectTexture(t,s,n=!1){const o=r(t.extent,s),m=new e({x:(t.extent.xmax-t.extent.xmin)/t.texture.descriptor.width,y:(t.extent.ymax-t.extent.ymin)/t.texture.descriptor.height,spatialReference:t.extent.spatialReference}),{x:c,y:d}=i(m,s,t.extent);let u=(c+d)/2;const g=Math.round((o.xmax-o.xmin)/u),f=Math.round((o.ymax-o.ymin)/u);u=(o.width/g+o.height/f)/2;const l=new e({x:u,y:u,spatialReference:o.spatialReference}),w=a({projectedExtent:o,srcBufferExtent:t.extent,pixelSize:l,hasWrapAround:!0,spacing:[16,16]}),b=x(this._rctx,w),j=new _(g,f);j.wrapMode=33071;const D=new h(this._rctx,j);this._rctx.bindFramebuffer(D),this._rctx.setViewport(0,0,g,f),this._rctx.useProgram(this._program),this._rctx.bindTexture(t.texture,0),this._rctx.bindTexture(b,1),this._quad.bind();const{width:R=0,height:y=0}=t.texture.descriptor;if(this._program.setUniform2f("u_srcImageSize",R,y),this._program.setUniform2fv("u_transformSpacing",w.spacing),this._program.setUniform2fv("u_transformGridSize",w.size),this._program.setUniform2f("u_targetImageSize",g,f),this._quad.draw(),this._quad.unbind(),this._rctx.useProgram(null),this._rctx.bindFramebuffer(null),b.dispose(),n){const{width:t,height:e}=D,r=new ImageData(t??0,e??0);D.readPixels(0,0,t??0,e??0,6408,p.UNSIGNED_BYTE,r.data);const i=D.detachColorTexture();return D.dispose(),{texture:i,extent:o,imageData:r}}const C=D.detachColorTexture();return D.dispose(),{texture:C,extent:o}}reprojectBitmapData(t,e){const r=n(t.bitmapData)?o(t.bitmapData):t.bitmapData,i=new _(t.bitmapData.width,t.bitmapData.height);i.wrapMode=33071;const a=new g(this._rctx,i,r),s=this.reprojectTexture({texture:a,extent:t.extent},e,!0);s.texture.dispose();const m=document.createElement("canvas"),c=s.imageData;m.width=c.width,m.height=c.height;return m.getContext("2d").putImageData(c,0,0),{bitmapData:m,extent:s.extent}}async loadAndReprojectBitmapData(e,r,i){const[a]=await Promise.all([t(e,{responseType:"image"}).then(t=>t.data),s()]),n=document.createElement("canvas");n.width=a.width,n.height=a.height;const o=n.getContext("2d");o.drawImage(a,0,0);const m=o.getImageData(0,0,n.width,n.height);if(r.spatialReference.equals(i))return{bitmapData:m,extent:r};const c=this.reprojectBitmapData({bitmapData:m,extent:r},i);return{bitmapData:c.bitmapData,extent:c.extent}}destroy(){this._ownsRctx?(f._instanceRefCount--,0===f._instanceRefCount&&(this._quad.dispose(),this._program.dispose(),this._rctx.dispose(),f._instance=null)):(this._quad.dispose(),this._program.dispose())}}export{f as ImageReprojector};
|
package/views/types.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import type { AbortOptions } from "../core/promiseUtils.js";
|
|
|
15
15
|
import type { ScreenPoint } from "../core/types.js";
|
|
16
16
|
import type { GeometryUnion } from "../geometry/types.js";
|
|
17
17
|
import type { MediaElement } from "../layers/support/media.js";
|
|
18
|
-
import type { NetworkFeature } from "../rest/support/
|
|
18
|
+
import type { NetworkFeature } from "../rest/support/types.js";
|
|
19
19
|
import type { AnalysisViewUnion } from "./analysis/types.js";
|
|
20
20
|
import type { EasingName } from "./animation/types.js";
|
|
21
21
|
import type { ViewEventTypes } from "./input/types.js";
|