@arcgis/core 5.0.0-next.7 → 5.0.0-next.9
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/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8f56f298e7c1a283f407.js → 0030d68d9edf42b4af57.js} +1 -1
- package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
- package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
- package/assets/esri/core/workers/chunks/{17d5f8dba6ebb1184506.js → 042cd64e1f4eb326c30f.js} +1 -1
- package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
- package/assets/esri/core/workers/chunks/{9486032af3e934d85582.js → 0a5d74414dd02a2fb8e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
- package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
- package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{73487b9d85e726e9c012.js → 1257c37bf04d39c27b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{398f356b11fd33bd3831.js → 136a7d781dad05a7463b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
- package/assets/esri/core/workers/chunks/17784cf16fa91504b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{a395373e3173e6458a56.js → 1ab37e13947d0e2e4181.js} +1 -1
- package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
- package/assets/esri/core/workers/chunks/1dfca37f95f2b968aa54.js +1 -0
- package/assets/esri/core/workers/chunks/{5bd36dbf46c25bd961c8.js → 21293b0c6405a10ec7b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{285762ff92d5388b6024.js → 2166238a7ad63a2d43c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{620a94b54be3ed78350d.js → 22ca80f491e070b2a5e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{88074189fa10c335370b.js → 24cd7b84cd0f3de4bff2.js} +1 -1
- package/assets/esri/core/workers/chunks/{ccc0da0e01f023c8aa1f.js → 28d1f2cf6aae547615c3.js} +1 -1
- package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
- package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → 2fa01bd3f3608616fd7f.js} +1 -1
- package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
- package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4d0ae6be1b3984228d0.js → 31b6406960261da21dd4.js} +1 -1
- package/assets/esri/core/workers/chunks/31c7ce65e16f7858400f.js +1 -0
- package/assets/esri/core/workers/chunks/31dbe07047dc61303d7d.js +1 -0
- package/assets/esri/core/workers/chunks/{8a314b3790313e6dc5db.js → 333b62dad3811cff0f14.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8733cd621105afab2ac.js → 35c9b24e4430bd6c2b6b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e31192ae920e3e19b6aa.js → 37c1f155da14de91565a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c55c096669677321a227.js → 38cd3648932bf2534b0f.js} +1 -1
- package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{f5e47eea8720ba84665b.js → 3c07aa2015ab1dff5f7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
- package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
- package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb5484b5eeacc9ad2ceb.js → 4d0cbf9584446f411a37.js} +1 -1
- package/assets/esri/core/workers/chunks/{17103e6542aae53c7301.js → 4e3e27673d0671fc2b58.js} +1 -1
- package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
- package/assets/esri/core/workers/chunks/{5fc7b61f467f1d60a284.js → 51ab2acac4ecc1ca9c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
- package/assets/esri/core/workers/chunks/{dedc4583b5f32a278124.js → 5350d50b47b6a4e0e169.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
- package/assets/esri/core/workers/chunks/{90f8b4bda28af43ea019.js → 538f509d7fc8337d37ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
- package/assets/esri/core/workers/chunks/58e59ead33368ce38c8f.js +1 -0
- package/assets/esri/core/workers/chunks/5db37547963857295273.js +1 -0
- package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c056eac35d05d9524b7.js → 5f29422a051311ef9b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac26e3e77df4302f47a2.js → 604777417722d4effe06.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff35a077ac6776469805.js → 61d970ed75c2c358b1e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{90b2b43b8b54c9a1ec35.js → 664ae441617afe4b17ec.js} +1 -1
- package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
- package/assets/esri/core/workers/chunks/{4c5a7249a311070d8f43.js → 6af18d7a0d314d7c1756.js} +1 -1
- package/assets/esri/core/workers/chunks/{f35aaa04cca676c2d3f8.js → 6b59f94040c7d2f6728a.js} +1 -1
- package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
- package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0e0a63962784acb4ba1.js → 6f0aec7428021e440ac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3991ae8caa713d4ddcd.js → 731f7b552dde0fb325cd.js} +1 -1
- package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
- package/assets/esri/core/workers/chunks/{b96eb0ea506379182d62.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{464d42bebb365287808d.js → 773f2c6c9d38db76dfed.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f3d492f1093b7832aab.js → 7803495f8862d9025bcd.js} +1 -1
- package/assets/esri/core/workers/chunks/7d641f2f5edd95b9bc18.js +1 -0
- package/assets/esri/core/workers/chunks/7e4c14d4502e3f06d94b.js +1 -0
- package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
- package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
- package/assets/esri/core/workers/chunks/{7544316a75dbd981aea6.js → 86cb097deec50b0da3f3.js} +1 -1
- package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
- package/assets/esri/core/workers/chunks/{95c594a87b732f5c4979.js → 89b748e064ca90b4f76a.js} +1 -1
- package/assets/esri/core/workers/chunks/8a40ed2ee4b032822c30.js +1 -0
- package/assets/esri/core/workers/chunks/{09de8be660174a229efb.js → 8cbb28476151a37ae958.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe77ae6cf232a7a3298e.js → 8d9d3797c6d62fdfff9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{62a49cfd9a2508950e9f.js → 8fedfd33c37172dba6bf.js} +1 -1
- package/assets/esri/core/workers/chunks/91aa1157da32f650983b.js +1 -0
- package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
- package/assets/esri/core/workers/chunks/{794748fd1edc29a621cd.js → 9698f36c143953a975d4.js} +1 -1
- package/assets/esri/core/workers/chunks/98584902c9db6faa3e4d.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{e5a06ce0ef6a9a90e100.js → 9f21436016ff7a899e79.js} +1 -1
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
- package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{a4db5c9a90107e097df8.js → af47272aaaef0ea57e71.js} +1 -1
- package/assets/esri/core/workers/chunks/b05208d56a724a8f1661.js +1 -0
- package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
- package/assets/esri/core/workers/chunks/{22d6b8102e75bdef204c.js → b7eb486354994dc70855.js} +1 -1
- package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
- package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
- package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
- package/assets/esri/core/workers/chunks/c715fd32f814a0f14f40.js +1 -0
- package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
- package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
- package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/cf971e7b1b98d9c502d3.js +1 -0
- package/assets/esri/core/workers/chunks/{279366e6b743f9680603.js → cfff044859e6e6dcc75d.js} +1 -1
- package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
- package/assets/esri/core/workers/chunks/{8833c3d168951be4bf20.js → d0d79dd3e88eecf5c314.js} +1 -1
- package/assets/esri/core/workers/chunks/d1ca7c3a32ce00ed8b81.js +1 -0
- package/assets/esri/core/workers/chunks/{76ae1702fecc7ad7017c.js → d1e97cce5047f1791e22.js} +1 -1
- package/assets/esri/core/workers/chunks/{17acde0245ecd956306c.js → d233cc33497a663450f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js → d391bfbaf0e790cd10d6.js} +2 -2
- package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{36fe6b8228e622407ec2.js → d8793eead02491136841.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d599008e1ea42321b37.js → da24ad57747714ac5eda.js} +1 -1
- package/assets/esri/core/workers/chunks/db678a6e352275e507a9.js +1 -0
- package/assets/esri/core/workers/chunks/{facb3886714222772ab2.js → ddfd01bb9ba8577c3ffc.js} +1 -1
- package/assets/esri/core/workers/chunks/de2ebd9cc3d9e68d435b.js +1 -0
- package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
- package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
- package/assets/esri/core/workers/chunks/e3294318daf1192b8319.js +1 -0
- package/assets/esri/core/workers/chunks/e599125e746c27de106e.js +1 -0
- package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
- package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
- package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9324e88c359c03f35aa.js → eb9c166db0db6fa60e95.js} +1 -1
- package/assets/esri/core/workers/chunks/ebcc94234d9d4be1941f.js +316 -0
- package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
- package/assets/esri/core/workers/chunks/{bc241c7735e4efba734a.js → f34e3fa0c5b28531e289.js} +1 -1
- package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
- package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{d97fadbc69e055d183a0.js → f77f4bd6a577b92cf66f.js} +1 -1
- package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
- package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → f89c90f98c85667b0ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c4227b0ea21a5e429ab.js → fb192de7e4fa152342bb.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
- package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
- package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
- package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
- 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/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/QueueProcessor.js +1 -1
- package/core/SetUtils.js +1 -1
- package/core/has.js +1 -1
- package/form/FormTemplate.js +1 -1
- package/form/elements/Element.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/GroupElement.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/identity/Credential.js +1 -1
- package/identity/IdentityManager.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +92 -50
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/package.json +4 -4
- package/popup/FieldInfo.js +1 -1
- package/processRequest.js +5 -0
- package/request.js +1 -1
- package/requestConfig.js +5 -0
- package/requestQueue.js +5 -0
- package/rest/query/executeForCount.js +1 -1
- package/rest/query/executeForExtent.js +1 -1
- package/rest/query/executeForIds.js +1 -1
- package/rest/query/executeQueryJSON.js +1 -1
- package/rest/query/executeQueryPBF.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +5 -0
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.js +5 -0
- package/rest/support/ImageMeasureResultAreaValue.js +5 -0
- package/rest/support/ImageMeasureResultLengthValue.js +5 -0
- package/rest/support/ImageWithType.js +5 -0
- package/rest/support/imageMeasureUtils.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/{3d/support/ImageWithType.js → 2d/layers/features/sources/strategies/constants.js} +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +1 -1
- package/views/3d/glTF/DefaultLoadingContext.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/fetchTile.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +6 -0
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/input/CursorUpdateEvents.js +5 -0
- package/views/draw/input/DrawCompleteEvent.js +5 -0
- package/views/draw/input/VertexAddEvent.js +5 -0
- package/views/draw/input/VertexRemoveEvent.js +5 -0
- package/views/draw/input/VertexUpdateEvent.js +5 -0
- package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/errors.js +5 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
- package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
- package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/020c8913d8e35d63080b.js +0 -1
- package/assets/esri/core/workers/chunks/02e69f0c63d97661da60.js +0 -1
- package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
- package/assets/esri/core/workers/chunks/06ba43843e9c4988049b.js +0 -1
- package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +0 -1
- package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
- package/assets/esri/core/workers/chunks/377a66034e7c1bad5599.js +0 -1
- package/assets/esri/core/workers/chunks/4442817beb7a76c95770.js +0 -1
- package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
- package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
- package/assets/esri/core/workers/chunks/53bd8996e8812f1ad7b2.js +0 -1
- package/assets/esri/core/workers/chunks/557960763695abee4a83.js +0 -1
- package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
- package/assets/esri/core/workers/chunks/6c3b99209d542efa64d4.js +0 -1
- package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
- package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +0 -1
- package/assets/esri/core/workers/chunks/7461124454bfb4fb6474.js +0 -1
- package/assets/esri/core/workers/chunks/75bf27271a31e26e1b21.js +0 -1
- package/assets/esri/core/workers/chunks/7aaaebbabee27690283c.js +0 -1
- package/assets/esri/core/workers/chunks/7c4a63aeead2505d6f02.js +0 -1
- package/assets/esri/core/workers/chunks/811d4c46c75cf6a63e78.js +0 -1
- package/assets/esri/core/workers/chunks/8ffd4710d168c2fcfd96.js +0 -1
- package/assets/esri/core/workers/chunks/90250e9239c173aace88.js +0 -1
- package/assets/esri/core/workers/chunks/9786f91455350eaae493.js +0 -1
- package/assets/esri/core/workers/chunks/99859dce1925b406ccd0.js +0 -1
- package/assets/esri/core/workers/chunks/9c5cbf8810f37b1a4718.js +0 -1
- package/assets/esri/core/workers/chunks/9e8dceef4c961f56940d.js +0 -1
- package/assets/esri/core/workers/chunks/9fac5a12e878cd745354.js +0 -1
- package/assets/esri/core/workers/chunks/a06bac9b8f9e18874de8.js +0 -316
- package/assets/esri/core/workers/chunks/a712cdff78fc826acd8c.js +0 -1
- package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
- package/assets/esri/core/workers/chunks/aa54b6f2aba6952af149.js +0 -1
- package/assets/esri/core/workers/chunks/b96eb0ea506379182d62.js +0 -2
- package/assets/esri/core/workers/chunks/c476643002387f60ea42.js +0 -1
- package/assets/esri/core/workers/chunks/c4e4da69969499a89a2c.js +0 -1
- package/assets/esri/core/workers/chunks/cd1930f08e1fc8b30b14.js +0 -1
- package/assets/esri/core/workers/chunks/d1fe816b6990918c13c7.js +0 -1
- package/assets/esri/core/workers/chunks/d305a21666b1ed5bf33d.js +0 -1
- package/assets/esri/core/workers/chunks/d40f57f9fc47f9a9f97c.js +0 -1
- package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
- package/assets/esri/core/workers/chunks/e82f5437bd66779c6740.js +0 -1
- package/assets/esri/core/workers/chunks/f6c8beb60f6d29945a2e.js +0 -1
- package/assets/esri/core/workers/chunks/f746e3f7ebff2bbdf333.js +0 -1
- package/assets/esri/core/workers/chunks/fd2efd1d1cf9d95a87e6.js +0 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
- package/views/3d/support/StreamDataLoader.js +0 -5
- package/views/3d/support/StreamDataRequester.js +0 -5
- package/views/3d/support/downloadSlots.js +0 -5
- package/views/draw/input/DrawEvents.js +0 -5
|
@@ -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 t from"../../../Graphic.js";import s from"../../../core/Accessor.js";import{createTask as i}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{makeHandle as a}from"../../../core/handleUtils.js";import{ignoreAbortErrors as r,isAborted as o,throwIfAborted as n}from"../../../core/promiseUtils.js";import{watch as l,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as d}from"../../../core/support/UpdatingHandles.js";import m from"../../../layers/GraphicsLayer.js";import{getGraphicEffectiveElevationInfo as y}from"../../../support/elevationInfoUtils.js";import u from"../../../symbols/CIMSymbol.js";import g from"../../../symbols/SimpleLineSymbol.js";import _ from"../../../symbols/support/ElevationInfo.js";import{ExclusiveOperationManager as f}from"../ExclusiveOperationManager.js";import{isPolyline as k,isValidInputGraphic as v}from"./elevationProfileGeometryUtils.js";import{ViewEventPriorities as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import s from"../../../core/Accessor.js";import{createTask as i}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{makeHandle as a}from"../../../core/handleUtils.js";import{ignoreAbortErrors as r,isAborted as o,throwIfAborted as n}from"../../../core/promiseUtils.js";import{watch as l,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as d}from"../../../core/support/UpdatingHandles.js";import m from"../../../layers/GraphicsLayer.js";import{getGraphicEffectiveElevationInfo as y}from"../../../support/elevationInfoUtils.js";import u from"../../../symbols/CIMSymbol.js";import g from"../../../symbols/SimpleLineSymbol.js";import _ from"../../../symbols/support/ElevationInfo.js";import{ExclusiveOperationManager as f}from"../ExclusiveOperationManager.js";import{isPolyline as k,isValidInputGraphic as v,isInternalGraphic as w}from"./elevationProfileGeometryUtils.js";import{ViewEventPriorities as b}from"../../input/InputManager.js";import{isCancelEvent as G}from"../../interactive/interactiveToolUtils.js";import S from"../../../widgets/Sketch/SketchViewModel.js";let M=class extends s{constructor(e){super(e),this._updatingHandles=new d,this._operationManager=new f}initialize(){const{view:e}=this;this._graphicsLayer=new m({listMode:"hide",internal:!0}),this._sketchViewModel=new S({layer:this._graphicsLayer,view:e,defaultCreateOptions:{mode:"click",hasZ:!0},updateOnGraphicClick:!1,defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{shapeOperation:"none"},toggleToolOnClick:!1,tool:"reshape"},polylineSymbol:this._lineSymbol,activeLineSymbol:this._lineSymbol}),this.addHandles([l(()=>({map:e.map,internalGraphicsLayer:this._graphicsLayer,state:this.state,geometryVisualizationVisible:this._analysis.viewOptions.geometryVisualizationVisible,visible:this.analysisViewData.visible}),({map:e,internalGraphicsLayer:t,state:s,geometryVisualizationVisible:i,visible:a})=>{L(e,t);const o=this.sketchGraphic;switch(o&&(o.visible=a),s){case"idle":case"reshaping-disabled":o&&!i&&(o.visible=!1),this._operationManager.stop(),this._ensureUpdatedSketchGraphic();break;case"reshaping":r(this._startReshape());break;case"awaiting-sketch":this.analysisViewData.interactive=!0}},c),l(()=>this._analysis.elevationInfo,e=>{this._graphicsLayer.elevationInfo=e},c)])}destroy(){this._operationManager.destroy(),this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map?.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),V(this._graphicsLayer,e),this._updateAnalysisFromSketchGraphic())}get state(){const{visible:e,interactive:t}=this.analysisViewData;if(!e)return"idle";switch(this._operationManager.currentOperationType){case"place":return this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch";case"pick-feature":return"picking";default:return this._analysis.geometry?t?"reshaping":"reshaping-disabled":"idle"}}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _analysis(){return this.analysisViewData.analysis}get _lineSymbol(){return j(this.view.type)}place(e){return this._operationManager.start("place",async t=>{const s=this._analysis.clone();this._ensureUpdatedSketchGraphic();const i=this._stashSketchGraphic(),n=this._sketchViewModel.on("create",e=>{switch(e.state){case"start":this.sketchGraphic=e.graphic,this._analysis.elevationInfo=this._graphicsLayer.elevationInfo,i.remove();break;case"active":this._updateAnalysisFromSketchGraphic();break;case"complete":this._updateAnalysisFromSketchGraphic(),t.stop();break;case"cancel":t.stop()}});t.handles.push(n,a(()=>(n.remove(),this._sketchViewModel.cancel(),this._updateAnalysisFromSketchGraphic(),this._analysis.valid?o(e)||s.equals(this._analysis)?t.reject():void t.resolve({}):(this._clear(),t.reject()))),i),this._graphicsLayer.elevationInfo=I,await this._updatingHandles.addPromise(r(this._sketchViewModel.create("polyline")))},e)}_stashSketchGraphic(){const e=this.sketchGraphic;if(!e)return a();const t=this._analysis.elevationInfo,s=new m({listMode:"hide",internal:!0,elevationInfo:t});return this.view.map.add(s),s.graphics.add(e),a(()=>{this.sketchGraphic===e&&(this._graphicsLayer.elevationInfo=t,this._graphicsLayer.add(e)),s.removeFromParent(),s.destroy()})}async pickFeature(e){return this._operationManager.start("pick-feature",async e=>{const{view:t}=this;t.closePopup();let s=null;const r=a=>{a.defer(async()=>{s?.abort(),s=i(async s=>{const{results:i}=await t.hitTest(a);n(s);let r=null;for(const e of i)if("graphic"===e.type&&v(e.graphic)&&!w(e.graphic)){r=e.graphic;break}r?(a.preventDefault(),a.stopPropagation(),this.sketchGraphic=null,this._analysis.geometry=r.geometry,this._analysis.elevationInfo=new _({...y(r)}),e.resolve({feature:r}),e.stop()):e.reject()}),await s.promise})},o=t=>{G(t)&&(e.reject(),e.stop())};e.handles.push(t.on("immediate-click",r,b.TOOL),t.on("key-down",o,b.TOOL),t.acquireCursor("crosshair","high"),a(()=>{s?.abort(),e.reject()})),t.focus()},e)}_startReshape(){return this._operationManager.start("reshape",async e=>{const t=()=>{const e=this._ensureUpdatedSketchGraphic();return e?(V(this._graphicsLayer,e),this._updatingHandles.addPromise(this._sketchViewModel.update(e,{tool:"reshape"}))):Promise.resolve()};if(!this._ensureUpdatedSketchGraphic())return;const s=this._sketchViewModel.on("update",s=>{this._updateAnalysisFromSketchGraphic(),"complete"===s.state&&("reshaping"===this.state?r(t()):e.resolve())});e.handles.push(s,a(()=>{s.remove(),this._sketchViewModel.cancel(),e.resolve()})),await t()})}_ensureUpdatedSketchGraphic(){const{geometry:e}=this._analysis;if(!e)return this.sketchGraphic=null,null;const s=this.sketchGraphic??=new t({symbol:this._lineSymbol,geometry:e});return s.geometry=e,s}_clear(){this.sketchGraphic=null,this._analysis.clear()}_updateAnalysisFromSketchGraphic(){let e=this.sketchGraphic?.geometry;k(e)||(e=null);const t=this._analysis;t.geometry!==e&&(t.geometry=e)}};function j(e){if("2d"===e){const e={type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",width:1.5};return new u({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{...e,effects:[{type:"CIMGeometricEffectDashes",dashTemplate:[5,4],lineDashEnding:"FullGap",controlPointEnding:"NoConstraint"}],color:[0,0,0,255]},{...e,color:[255,255,255,255]}]}}})}return new g({color:[0,0,0,0]})}function L(e,t){t&&(t.removeFromParent(),e?.add(t))}function V({graphics:e},t){t?(e.includes(t)||e.add(t),1!==e.length&&e.removeMany(e.filter(e=>e!==t))):e.removeAll()}e([h({constructOnly:!0})],M.prototype,"analysisViewData",void 0),e([h({constructOnly:!0})],M.prototype,"view",void 0),e([h()],M.prototype,"sketchGraphic",null),e([h({nonNullable:!0})],M.prototype,"state",null),e([h()],M.prototype,"updating",null),e([h()],M.prototype,"_analysis",null),e([h()],M.prototype,"_lineSymbol",null),M=e([p("esri.views.analysis.ElevationProfile.ElevationProfileTool")],M);const I=new _({mode:"on-the-ground",offset:0});export{M as ElevationProfileTool};
|
|
@@ -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{floatEqualUlp as e,lerp as t}from"../../../core/mathUtils.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as r}from"../../../core/unitUtils.js";import{distance as s,lerp as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{l as i}from"../../../chunks/vec32.js";import a from"../../../geometry/Polyline.js";import{initializeProjection as c,project as u}from"../../../geometry/projectionUtils.js";import l from"../../../geometry/SpatialReference.js";import{geodesicLengths as f,isSupported as h,inverseGeodeticSolver as p,directGeodeticSolver as m}from"../../../geometry/support/geodesicUtils.js";import{getElevationOffset as d}from"../../../support/elevationInfoUtils.js";import{TooComplexError as g}from"./elevationProfileErrors.js";async function y(e,t,s,o,i,a,h){let p,m,d;const y=e.spatialReference,j=y.isGeographic||y.isWebMercator;let v=0;if(!j){const{execute:t}=await import("../../../geometry/operators/lengthOperator.js");n(h),v=t(e,{unit:"meters"}),n(h)}const P=1/r(o);if(j){await c([{source:y,dest:o},{source:y,dest:l.WGS84}],h);const n=
|
|
5
|
+
import{floatEqualUlp as e,lerp as t}from"../../../core/mathUtils.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as r}from"../../../core/unitUtils.js";import{distance as s,lerp as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{l as i}from"../../../chunks/vec32.js";import a from"../../../geometry/Polyline.js";import{initializeProjection as c,project as u}from"../../../geometry/projectionUtils.js";import l from"../../../geometry/SpatialReference.js";import{geodesicLengths as f,isSupported as h,inverseGeodeticSolver as p,directGeodeticSolver as m}from"../../../geometry/support/geodesicUtils.js";import{getElevationOffset as d}from"../../../support/elevationInfoUtils.js";import{TooComplexError as g}from"./elevationProfileErrors.js";async function y(e,t,s,o,i,a,h){let p,m,d;const y=e.spatialReference,j=y.isGeographic||y.isWebMercator;let v=0;if(!j){const{execute:t}=await import("../../../geometry/operators/lengthOperator.js");n(h),v=t(e,{unit:"meters"}),n(h)}const P=1/r(o);if(j){await c([{source:y,dest:o},{source:y,dest:l.WGS84}],h);const n=q(e);p=f([n],"meters")[0];const r=w(p,i);if(C(e,p,r)>a)throw new g;const j=R(n,t,s);({densifiedPath:m,distances:d}=W(j,r,P)),m=u(m,o)}else{await c([{source:y,dest:o}],h),p=v;const r=w(p,i);if(C(e,p,r)>a)throw new g;const l=R(e,t,s);({densifiedPath:m,distances:d}=G(l,r,P)),n(h),m=u(m,o)}return{densifiedPath:m,pathLength:p*P,distances:d}}function w(e,t){const n=e/t.densificationMaxSamples;return Math.max(t.samplingDistance,n)}function R(e,t,n){if(null==t)return P(e);const r=e.spatialReference,s=t.mode,o=d(t,r);let i=null;switch(n.type){case"2d":i=j(e,s,o);break;case"3d":i=v(e,s,o,n)}return null==i?P(e):new a({hasZ:!0,hasM:!1,spatialReference:r,paths:Z(e.paths,i)})}function j({hasZ:e},t,n){return"absolute-height"===t?e?([e,t,r])=>[e,t,r+n]:([e,t])=>[e,t,n]:null}function v({spatialReference:e,hasZ:t},n,r,{elevationProvider:s}){const o=(t,n,r,o)=>s?.getElevation(t,n,r,e,o)??0;switch(n){case"on-the-ground":return([e,t])=>[e,t,o(e,t,0,"ground")];case"absolute-height":return t?([e,t,n])=>[e,t,n+r]:([e,t])=>[e,t,r];case"relative-to-ground":return t?([e,t,n])=>[e,t,n+o(e,t,n,"ground")+r]:([e,t])=>[e,t,o(e,t,0,"ground")+r];case"relative-to-scene":return t?([e,t,n])=>[e,t,n+o(e,t,n,"scene")+r]:([e,t])=>[e,t,o(e,t,0,"scene")+r];default:return null}}function P(e){return e.hasZ?new a({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:Z(e.paths,([e,t])=>[e,t])}):e}function Z(e,t){const n=e.length,r=new Array(n);for(let s=0;s<n;++s){const n=e[s],o=n.length,i=new Array(n.length);r[s]=i;for(let e=0;e<o;++e)i[e]=t(n[e])}return r}function M(e){return U(e)&&e.paths.some(e=>e.length>1)}function x(e){return S(e)&&M(e.geometry)}function S(e){return b(e)&&U(e?.geometry)}function U(e){return!b(e)&&null!=e&&"polyline"===e.type}function b(e){return null!=e&&"geometry"in e}function A(e){const t=e?.layer;return null!=t&&"graphics"===t.type&&t.internal}function z(t,n,s,o,i){const{spatialReference:c,hasZ:u}=t,l={from:null,to:null,distance:0,azimuth:0,reverseAzimuth:0,spatialReference:c,metersPerSR:r(c)},f=[],h=[];let p=0;for(let r=0;r<t.paths.length;++r){const a=t.paths[r],c=new Array,u=new Array;let m=0;for(let t=1;t<a.length;++t){const r=a[t-1],f=a[t],h=o(l,r,f);let d;for(d=m;d<h.distance&&!e(d,h.distance);d+=n)c.push(i(h,d)),u.push((p+d)*s);m=d-h.distance,p+=h.distance,c.push(f),u.push(p*s)}f[r]=c,h[r]=u}return{densifiedPath:new a({spatialReference:c,hasZ:u,paths:f}),distances:h}}function G(e,t,n){const{hasZ:r}=e;return z(e,t,n,E,r?O:L)}function W(e,t,n){const{hasZ:r}=e;return z(e,t,n,k,r?I:D)}function k(e,t,n){return e.distance=0,p(e,t,n,e.spatialReference),e.from=t,e.to=n,e}function E(e,t,n){return e.from=t,e.to=n,e.distance=s(n,t)*e.metersPerSR,e}function D({from:e,azimuth:t,spatialReference:n},r){return m([0,0],e,t,r,n)}function I({from:e,to:n,azimuth:r,distance:s,spatialReference:o},i){const a=i/s,c=[0,0,t(e[2],n[2],a)];return m(c,e,r,i,o),c}function L({from:e,to:t,distance:n},r){return o([0,0],e,t,r/n)}function O({from:e,to:t,distance:n},r){return i([0,0,0],e,t,r/n)}function q(e){return h(e.spatialReference)?e:u(e,l.WGS84)}function B(e){return e.paths.reduce((e,t)=>e+t.length,0)}function C(e,t,n){return B(e)+Math.floor(t/n)+Math.max(0,e.paths.reduce(e=>1+e,0)-1)}export{B as countPoints,y as densifyPath,b as isGraphic,A as isInternalGraphic,U as isPolyline,S as isPolylineGraphic,x as isValidInputGraphic,M as isValidInputPath,R as toAbsoluteHeightElevation};
|
|
@@ -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"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import i from"../../geometry/Point.js";import o from"./DrawAction.js";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import i from"../../geometry/Point.js";import o from"./DrawAction.js";import{CursorUpdateEvent as r}from"./input/CursorUpdateEvents.js";import{DrawCompleteEvent as s}from"./input/DrawCompleteEvent.js";import{VertexAddEvent as n}from"./input/VertexAddEvent.js";import{VertexRemoveEvent as a}from"./input/VertexRemoveEvent.js";import{ViewEventPriorities as d}from"../input/InputManager.js";import{sketchKeys as p}from"../interactive/keybindings.js";import{createScreenPointFromEvent as h}from"../support/screenUtils.js";const l=Symbol("view-handles"),c=Symbol("undo-redo-handles");let _=class extends o{constructor(e){super(e),this._popVertexOnPointerMove=!1,this._addVertexOnPointerUp=!1}initialize(){this._addViewHandles(),this._addUndoRedoHandles()}destroy(){this._removeViewHandles(),this._removeUndoRedoHandles(),this.emit("destroy")}undo(){super.undo(),this.notifyChange("vertices")}redo(){super.redo(),this.notifyChange("vertices")}complete(){this._completeDrawing()}_addViewHandles(){this._removeViewHandles(),this.addHandles([this.view.on("click",e=>{e.stopPropagation()},d.TOOL),this.view.on("pointer-down",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._activePointerId=e.pointerId,this._addVertexOnPointerUp=!0,this._cursorScreenPoint=h(e),"touch"===e.pointerType&&this._updateCursor())},d.TOOL),this.view.on("pointer-move",e=>{this._popVertexOnPointerMove&&(this.undo(),this._popVertexOnPointerMove=!1),this._abortSnapping(),this._cursorScreenPoint=h(e),"touch"!==e.pointerType&&this._updateCursor()},d.TOOL),this.view.on("pointer-drag",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._addVertexOnPointerUp=!1)},d.TOOL),this.view.on("pointer-up",e=>{if(this._shouldHandlePointerEvent(e)){if(this._abortSnapping(),this._activePointerId=null,!this._addVertexOnPointerUp){const t="touch"===e.pointerType;return void this._updateCursor(t)}this._vertexAddHandler(e)}},d.TOOL),this.view.on("drag",["Shift"],e=>{e.stopPropagation()},d.TOOL),this.view.on("double-click",e=>{e.stopPropagation(),this._drawCompleteHandler(e)},d.TOOL),this.view.on("double-click",["Control"],e=>{e.stopPropagation(),this._drawCompleteHandler(e)},d.TOOL),this.view.on("key-down",e=>{const{key:t,repeat:i}=e;t===p.vertexAdd&&!i&&this._cursorScreenPoint?(e.stopPropagation(),this._abortSnapping(),this._vertexAddHandler(e)):t!==p.complete||i?t!==p.undo||this.interactiveUndoDisabled||i?t!==p.redo||this.interactiveUndoDisabled||i?t!==p.pan||i||e.stopPropagation():(e.stopPropagation(),this.redo()):(e.stopPropagation(),this.undo()):(e.stopPropagation(),this._drawCompleteHandler(e))},d.TOOL),this.view.on("key-up",e=>{e.key===p.pan&&e.stopPropagation()},d.TOOL)],l)}_addUndoRedoHandles(){this._removeUndoRedoHandles(),this.addHandles([this._editGeometryOperations.on("vertex-remove",e=>{if(this.notifyChange("vertices"),"undo"===e.operation){const t=[...this._committedVertices];null!=this._stagedVertex&&t.push(this._coordinateHelper.pointToArray(this._stagedVertex)),this.emit("undo",new a(this.view,e.vertices[0].index,t))}}),this._editGeometryOperations.on("vertex-add",e=>{if(this.notifyChange("vertices"),"apply"===e.operation){const e=this._committedVertices.length-1,t=new n(this.view,e,this.vertices);this.emit("vertex-add",t),t.defaultPrevented&&(this._popVertexOnPointerMove=!0)}else if("redo"===e.operation){const t=[...this._committedVertices];null!=this._stagedVertex&&t.push(this._coordinateHelper.pointToArray(this._stagedVertex)),this.emit("redo",new n(this.view,e.vertices[0].index,t))}})],c)}_removeViewHandles(){this.removeHandles(l)}_removeUndoRedoHandles(){this.removeHandles(c)}_addVertex(e){const t=this._coordinateHelper.arrayToVector(e);this._isDuplicateOfLastVertex(t)||this._editGeometryOperations.appendVertexToFirstPart(t)}_updateCursor(e=!1){if(this._popCursorVertex(),!this._cursorScreenPoint)return;const t=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);null==t||e||this._pushCursorVertex(t.vertex,()=>this.emit("cursor-update",new r(this.view,this._activeComponent.vertices.length,this.vertices,null!=this._stagedVertex?new i(this._stagedVertex):null)))}_completeDrawing(){if(this._activePointerId=null,this._popCursorVertex(),this._abortSnapping(),null!=this._snappingManager&&this._snappingManager.doneSnapping(),this.vertices.length<1)return;const e=new s(this.vertices);this.emit("draw-complete",e),e.defaultPrevented||this._removeViewHandles()}};_=e([t("esri.views.draw.MultipointDrawAction")],_);const u=_;export{u 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"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import i from"../../geometry/Point.js";import o from"./DrawAction.js";import{CursorUpdateEvent as r
|
|
5
|
+
import{__decorate as t}from"tslib";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import i from"../../geometry/Point.js";import o from"./DrawAction.js";import{CursorUpdateEvent as r}from"./input/CursorUpdateEvents.js";import{DrawCompleteEvent as s}from"./input/DrawCompleteEvent.js";import{ViewEventPriorities as n}from"../input/InputManager.js";import{sketchKeys as a}from"../interactive/keybindings.js";import{loadAutomaticLengthMeasurementUtils as d}from"../support/automaticLengthMeasurementUtils.js";import{createScreenPointFromEvent as p}from"../support/screenUtils.js";let h=class extends o{constructor(t){super(t),this._addVertexOnPointerUp=!1,this._drawTool=null}initialize(){this._addViewHandles(),"3d"===this.view.type&&this.addResolvingPromise(this._addDrawTool())}destroy(){this._removeDrawTool(),this.emit("destroy")}complete(){this._completeDrawing()}_addViewHandles(){this._addViewHandles2DOnly(),this.addHandles([this.view.on("key-down",t=>{t.key===a.complete&&(this._drawTool?this.complete():(this._abortSnapping(),this._vertexAddHandler(t)))},n.TOOL)])}_addViewHandles2DOnly(){"2d"===this.view.type&&this.addHandles([this.view.on("pointer-down",t=>{this._shouldHandlePointerEvent(t)&&(this._abortSnapping(),this._activePointerId=t.pointerId,this._addVertexOnPointerUp=!0,this._cursorScreenPoint=p(t),"touch"===t.pointerType&&this._updateCursor())},n.TOOL),this.view.on("pointer-move",t=>{this._abortSnapping(),this._cursorScreenPoint=p(t),"touch"!==t.pointerType&&this._updateCursor()},n.TOOL),this.view.on("pointer-drag",t=>{this._shouldHandlePointerEvent(t)&&(this._abortSnapping(),this._addVertexOnPointerUp=!1)},n.TOOL),this.view.on("pointer-up",t=>{if(this._shouldHandlePointerEvent(t)){if(this._abortSnapping(),this._activePointerId=null,!this._addVertexOnPointerUp){const e="touch"===t.pointerType;return void this._updateCursor(e)}t.stopPropagation(),this._vertexAddHandler(t)}},n.TOOL),this.view.on("drag",["Shift"],t=>{t.stopPropagation()},n.TOOL)])}async _addDrawTool(){const[{LegacyDrawTool:t},e]=await Promise.all([import("./LegacyDrawTool.js"),d()]),i=new t({view:this.view,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"point",mode:"click",automaticLengthMeasurementUtils:e});this.destroyed?i.destroy():(this._drawTool=i,this.view.addAndActivateTool(i),this.addHandles([i.on("cursor-update",t=>{1===t.vertices.length&&this.emit("cursor-update",new r(this.view,t.vertices[0].vertexIndex,i.getVertexCoords()))}),i.on("complete",t=>{this.emit("draw-complete",new s(i.getVertexCoords())),this._removeDrawTool(),this.removeAllHandles()})]))}_removeDrawTool(){this._drawTool&&(this.view.tools.remove(this._drawTool),this._drawTool=null)}_addVertex(t){const e=this._coordinateHelper.arrayToVector(t);this._isDuplicateOfLastVertex(e)||(this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometryOperations.appendVertexToFirstPart(e),this.notifyChange("vertices"),this._completeDrawing())}_updateCursor(t=!1){if(this._popCursorVertex(),!this._cursorScreenPoint)return;const e=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);null==e||t||this._pushCursorVertex(e.vertex,()=>this.emit("cursor-update",new r(this.view,this._activeComponent.vertices.length,this.vertices,null!=this._stagedVertex?new i(this._stagedVertex):null)))}_completeDrawing(){if(this._drawTool)return void this._drawTool.completeCreateOperation();this._activePointerId=null,this._popCursorVertex(),this._abortSnapping(),null!=this._snappingManager&&this._snappingManager.doneSnapping();const t=new s(this.vertices);this.emit("draw-complete",t),t.defaultPrevented||this.removeAllHandles()}};h=t([e("esri.views.draw.PointDrawAction")],h);const l=h;export{l 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 e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../geometry/Point.js";import r from"./DrawAction.js";import{drawingModes as s,defaultDrawingMode as n}from"./DrawingMode.js";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../geometry/Point.js";import r from"./DrawAction.js";import{drawingModes as s,defaultDrawingMode as n}from"./DrawingMode.js";import{CursorUpdateEvent as a}from"./input/CursorUpdateEvents.js";import{DrawCompleteEvent as d}from"./input/DrawCompleteEvent.js";import{VertexAddEvent as h}from"./input/VertexAddEvent.js";import{VertexRemoveEvent as p}from"./input/VertexRemoveEvent.js";import{ViewEventPriorities as l}from"../input/InputManager.js";import{sketchKeys as c}from"../interactive/keybindings.js";import{loadAutomaticLengthMeasurementUtils as _}from"../support/automaticLengthMeasurementUtils.js";import{createScreenPointFromEvent as m}from"../support/screenUtils.js";let v=class extends r{constructor(e){super(e),this._panEnabled=!1,this._popVertexOnPointerMove=!1,this._addVertexOnPointerUp=!1,this._drawTool=null,this.mode=n}initialize(){this._addViewHandles(),"3d"===this.view.type&&this.addResolvingPromise(this._addDrawTool())}destroy(){this._removeDrawTool(),this.emit("destroy")}get _dragEnabled(){return"freehand"===this.mode||"hybrid"===this.mode}get _clickEnabled(){return"click"===this.mode||"hybrid"===this.mode}undo(){this._drawTool?this._drawTool.undo():(super.undo(),this.notifyChange("vertices"))}redo(){this._drawTool?this._drawTool.redo():(super.redo(),this.notifyChange("vertices"))}canUndo(){return this._drawTool?.canUndo()??super.canUndo()}canRedo(){return this._drawTool?.canRedo()??super.canRedo()}complete(){this._completeDrawing()}_getGeometryZValue(){return this.hasZ&&this.vertices.length>0?this.vertices[0][2]:this.defaultZ}_addViewHandles(){this._addViewHandles2DOnly(),this.addHandles(this.view.on("key-down",e=>{const{key:t,repeat:i}=e;t!==c.vertexAdd||i?t!==c.complete||i?t!==c.undo||this.interactiveUndoDisabled||i?t!==c.redo||this.interactiveUndoDisabled||i||(e.stopPropagation(),this.redo()):(e.stopPropagation(),this.undo()):(e.stopPropagation(),this._drawCompleteHandler(e)):(e.stopPropagation(),this._handleVertexAddKey(e))},l.TOOL))}_addViewHandles2DOnly(){"2d"===this.view.type&&(this.addHandles([this.view.on("click",e=>{e.stopPropagation()},l.TOOL),this.view.on("pointer-down",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._activePointerId=e.pointerId,this._addVertexOnPointerUp=!0,this._cursorScreenPoint=m(e),"touch"===e.pointerType&&this._updateCursor())},l.TOOL),this.view.on("pointer-move",e=>{this._abortSnapping(),this._popVertexOnPointerMove&&(this.undo(),this._popVertexOnPointerMove=!1),this._cursorScreenPoint=m(e),"touch"!==e.pointerType&&this._updateCursor()},l.TOOL),this.view.on("pointer-drag",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._cursorScreenPoint=m(e),this._dragEnabled&&!this._panEnabled?this._vertexAddHandler(e):this._addVertexOnPointerUp=!1)},l.TOOL),this.view.on("pointer-up",e=>{if(this._shouldHandlePointerEvent(e)){if(this._abortSnapping(),this._activePointerId=null,!this._addVertexOnPointerUp){const t="touch"===e.pointerType;return void this._updateCursor(t)}if(!this._clickEnabled)return 1===this.vertices.length&&this.vertices.pop(),void this._drawCompleteHandler(e);this._vertexAddHandler(e)}},l.TOOL),this.view.on("drag",e=>{this._dragEnabled&&null!=this._activePointerId&&!this._panEnabled&&e.stopPropagation()},l.TOOL),this.view.on("drag",["Shift"],e=>{e.stopPropagation()},l.TOOL),this.view.on("double-click",e=>{e.stopPropagation(),this._drawCompleteHandler(e)},l.TOOL),this.view.on("double-click",["Control"],e=>{e.stopPropagation(),this._drawCompleteHandler(e)},l.TOOL),this.view.on("key-down",e=>{const{key:t,repeat:i}=e;t!==c.pan||i||(e.stopPropagation(),this._panEnabled=!0)},l.TOOL),this.view.on("key-up",e=>{e.key===c.pan&&(e.stopPropagation(),this._panEnabled=!1)},l.TOOL)]),this._addUndoRedoHandles())}_handleVertexAddKey(e){this._drawTool?this._drawTool.drawOperation.commitStagedVertex():this._cursorScreenPoint&&(this._abortSnapping(),this._vertexAddHandler(e))}_addUndoRedoHandles(){this.addHandles([this._editGeometryOperations.on("vertex-remove",e=>{if(this.notifyChange("vertices"),"undo"===e.operation){const t=[...this._committedVertices];null!=this._stagedVertex&&t.push(this._coordinateHelper.pointToArray(this._stagedVertex)),this.emit("undo",new p(this.view,e.vertices[0].index,t))}}),this._editGeometryOperations.on("vertex-add",e=>{if(this.notifyChange("vertices"),"apply"===e.operation){const e=this._committedVertices.length-1,t=new h(this.view,e,this.vertices);this.emit("vertex-add",t),t.defaultPrevented&&(this._popVertexOnPointerMove=!0)}else if("redo"===e.operation){const t=[...this._committedVertices];null!=this._stagedVertex&&t.push(this._coordinateHelper.pointToArray(this._stagedVertex)),this.emit("redo",new h(this.view,e.vertices[0].index,t))}})])}async _addDrawTool(){const[{LegacyDrawTool:e},t]=await Promise.all([import("./LegacyDrawTool.js"),_()]),i=new e({view:this.view,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"polygon",mode:this.mode,automaticLengthMeasurementUtils:t});this.destroyed?i.destroy():(this._drawTool=i,this.view.addAndActivateTool(i),i.on("vertex-add",e=>{if(1===e.vertices.length){const{view:t}=this,o=e.vertices[0].vertexIndex,r=i.getVertexCoords();this.emit("vertex-add",new h(t,o,r)),"undo"!==e.operation&&"redo"!==e.operation||this.emit(e.operation,new h(t,o,r))}}),i.on("vertex-remove",e=>{if(1===e.vertices.length){const{view:t}=this,o=e.vertices[0].vertexIndex,r=i.getVertexCoords();this.emit("vertex-remove",new p(t,o,r)),"undo"!==e.operation&&"redo"!==e.operation||this.emit(e.operation,new p(t,o,r))}}),i.on("cursor-update",e=>{1===e.vertices.length&&this.emit("cursor-update",new a(this.view,e.vertices[0].vertexIndex,i.getVertexCoords()))}),i.on("complete",e=>{this.emit("draw-complete",new d(i.getVertexCoords())),this._removeDrawTool(),this.removeAllHandles()}))}_removeDrawTool(){this._drawTool&&(this.view.tools.remove(this._drawTool),this._drawTool=null)}_addVertex(e){const t=this._coordinateHelper.arrayToVector(e);this._isDuplicateOfLastVertex(t)||(this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometryOperations.appendVertexToFirstPart(t))}_updateCursor(e=!1){if(this._popCursorVertex(),!this._cursorScreenPoint)return;const t=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);null==t||e||this._pushCursorVertex(t.vertex,()=>this.emit("cursor-update",new a(this.view,this._activeComponent.vertices.length,this.vertices,null!=this._stagedVertex?new o(this._stagedVertex):null)))}_completeDrawing(){if(this._drawTool)return void this._drawTool.completeCreateOperation();if(this._activePointerId=null,this._popCursorVertex(),this._committedVertices.length<3)return;this._abortSnapping(),null!=this._snappingManager&&this._snappingManager.doneSnapping();const e=new d(this.vertices);this.emit("draw-complete",e),e.defaultPrevented||this.removeAllHandles()}};e([t()],v.prototype,"_dragEnabled",null),e([t()],v.prototype,"_clickEnabled",null),e([t({type:s})],v.prototype,"mode",void 0),v=e([i("esri.views.draw.PolygonDrawAction")],v);const u=v;export{u 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 e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../geometry/Point.js";import r from"./DrawAction.js";import{drawingModes as s,defaultDrawingMode as n}from"./DrawingMode.js";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../geometry/Point.js";import r from"./DrawAction.js";import{drawingModes as s,defaultDrawingMode as n}from"./DrawingMode.js";import{CursorUpdateEvent as a}from"./input/CursorUpdateEvents.js";import{DrawCompleteEvent as d}from"./input/DrawCompleteEvent.js";import{VertexAddEvent as h}from"./input/VertexAddEvent.js";import{VertexRemoveEvent as p}from"./input/VertexRemoveEvent.js";import{ViewEventPriorities as l}from"../input/InputManager.js";import{sketchKeys as c}from"../interactive/keybindings.js";import{loadAutomaticLengthMeasurementUtils as _}from"../support/automaticLengthMeasurementUtils.js";import{createScreenPointFromEvent as m}from"../support/screenUtils.js";let v=class extends r{constructor(e){super(e),this._panEnabled=!1,this._popVertexOnPointerMove=!1,this._addVertexOnPointerUp=!1,this._drawTool=null,this.mode=n}initialize(){this._addViewHandles(),"3d"===this.view.type&&this.addResolvingPromise(this._addDrawTool())}destroy(){this._removeDrawTool(),this.emit("destroy")}get _clickEnabled(){return"click"===this.mode||"hybrid"===this.mode}get _dragEnabled(){return"freehand"===this.mode||"hybrid"===this.mode}undo(){this._drawTool?this._drawTool.undo():(super.undo(),this.notifyChange("vertices"))}redo(){this._drawTool?this._drawTool.redo():(super.redo(),this.notifyChange("vertices"))}canUndo(){return this._drawTool?.canUndo()??super.canUndo()}canRedo(){return this._drawTool?.canRedo()??super.canRedo()}complete(){this._completeDrawing()}_addViewHandles(){this._addViewHandles2DOnly(),this.addHandles([this.view.on("key-down",e=>{const{key:t,repeat:i}=e;t!==c.vertexAdd||i?t!==c.complete||i?t!==c.undo||this.interactiveUndoDisabled||i?t!==c.redo||this.interactiveUndoDisabled||i||(e.stopPropagation(),this.redo()):(e.stopPropagation(),this.undo()):(e.stopPropagation(),this._drawCompleteHandler(e)):(e.stopPropagation(),this._handleVertexAddKey(e))},l.TOOL)])}_addViewHandles2DOnly(){"2d"===this.view.type&&(this.addHandles([this.view.on("click",e=>{e.stopPropagation()},l.TOOL),this.view.on("pointer-down",e=>{this._shouldHandlePointerEvent(e)&&!this._panEnabled&&(this._abortSnapping(),this._activePointerId=e.pointerId,this._addVertexOnPointerUp=!0,this._cursorScreenPoint=m(e),"touch"===e.pointerType&&this._updateCursor())},l.TOOL),this.view.on("pointer-move",e=>{this._popVertexOnPointerMove&&(this.undo(),this._popVertexOnPointerMove=!1),this._abortSnapping(),this._cursorScreenPoint=m(e),"touch"!==e.pointerType&&this._updateCursor()},l.TOOL),this.view.on("pointer-drag",e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._cursorScreenPoint=m(e),this._dragEnabled&&!this._panEnabled?this._vertexAddHandler(e):this._addVertexOnPointerUp=!1)},l.TOOL),this.view.on("pointer-up",e=>{if(this._shouldHandlePointerEvent(e)){if(this._abortSnapping(),this._activePointerId=null,!this._addVertexOnPointerUp){const t="touch"===e.pointerType;return void this._updateCursor(t)}if(!this._clickEnabled)return 1===this.vertices.length&&this.vertices.pop(),void this._drawCompleteHandler(e);this._vertexAddHandler(e)}},l.TOOL),this.view.on("drag",e=>{this._dragEnabled&&null!=this._activePointerId&&!this._panEnabled&&e.stopPropagation()},l.TOOL),this.view.on("drag",["Shift"],e=>{e.stopPropagation()},l.TOOL),this.view.on("double-click",e=>{e.stopPropagation(),this._drawCompleteHandler(e)},l.TOOL),this.view.on("double-click",["Control"],e=>{e.stopPropagation(),this._drawCompleteHandler(e)},l.TOOL),this.view.on("key-down",e=>{const{key:t,repeat:i}=e;t!==c.pan||i||(e.stopPropagation(),this._panEnabled=!0)},l.TOOL),this.view.on("key-up",e=>{e.key===c.pan&&(e.stopPropagation(),this._panEnabled=!1)},l.TOOL)]),this._addUndoRedoHandles())}_handleVertexAddKey(e){this._drawTool?this._drawTool.drawOperation.commitStagedVertex():this._cursorScreenPoint&&(this._abortSnapping(),this._vertexAddHandler(e))}_addUndoRedoHandles(){this.addHandles([this._editGeometryOperations.on("vertex-remove",e=>{if(this.notifyChange("vertices"),"undo"===e.operation){const t=[...this._committedVertices];null!=this._stagedVertex&&t.push(this._coordinateHelper.pointToArray(this._stagedVertex)),this.emit("undo",new p(this.view,e.vertices[0].index,t))}}),this._editGeometryOperations.on("vertex-add",e=>{if(this.notifyChange("vertices"),"apply"===e.operation){const e=this._committedVertices.length-1,t=new h(this.view,e,this.vertices);this.emit("vertex-add",t),t.defaultPrevented&&(this._popVertexOnPointerMove=!0)}else if("redo"===e.operation){const t=[...this._committedVertices];null!=this._stagedVertex&&t.push(this._coordinateHelper.pointToArray(this._stagedVertex)),this.emit("redo",new h(this.view,e.vertices[0].index,t))}})])}async _addDrawTool(){const[{LegacyDrawTool:e},t]=await Promise.all([import("./LegacyDrawTool.js"),_()]),i=new e({view:this.view,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"polyline",mode:this.mode,automaticLengthMeasurementUtils:t});this.destroyed?i.destroy():(this._drawTool=i,this.view.addAndActivateTool(i),this.addHandles([i.on("vertex-add",e=>{if(1!==e.vertices.length)return;const{view:t}=this,o=e.vertices[0].vertexIndex,r=i.getVertexCoords();this.emit("vertex-add",new h(t,o,r)),"undo"!==e.operation&&"redo"!==e.operation||this.emit(e.operation,new h(t,o,r))}),i.on("vertex-remove",e=>{if(1!==e.vertices.length)return;const{view:t}=this,o=e.vertices[0].vertexIndex,r=i.getVertexCoords();this.emit("vertex-remove",new p(t,o,r)),"undo"!==e.operation&&"redo"!==e.operation||this.emit(e.operation,new p(t,o,r))}),i.on("cursor-update",e=>{1===e.vertices.length&&this.emit("cursor-update",new a(this.view,e.vertices[0].vertexIndex,i.getVertexCoords()))}),i.on("complete",e=>{this.emit("draw-complete",new d(i.getVertexCoords())),this._removeDrawTool(),this.removeAllHandles()})]))}_removeDrawTool(){this._drawTool&&(this.view.tools.remove(this._drawTool),this._drawTool=null)}_addVertex(e){const t=this._coordinateHelper.arrayToVector(e);this._isDuplicateOfLastVertex(t)||(this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometryOperations.appendVertexToFirstPart(t))}_updateCursor(e=!1){if(this._popCursorVertex(),!this._cursorScreenPoint)return;const t=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);null==t||e||this._pushCursorVertex(t.vertex,()=>this.emit("cursor-update",new a(this.view,this._activeComponent.vertices.length,this.vertices,null!=this._stagedVertex?new o(this._stagedVertex):null)))}_completeDrawing(){if(this._drawTool)return void this._drawTool.completeCreateOperation();if(this._activePointerId=null,this._popCursorVertex(),this._committedVertices.length<2)return;this._abortSnapping(),null!=this._snappingManager&&this._snappingManager.doneSnapping();const e=new d(this.vertices);this.emit("draw-complete",e),e.defaultPrevented||this.removeAllHandles()}};e([t()],v.prototype,"_clickEnabled",null),e([t()],v.prototype,"_dragEnabled",null),e([t({type:s})],v.prototype,"mode",void 0),v=e([i("esri.views.draw.PolylineDrawAction")],v);const u=v;export{u 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 e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import r from"../../geometry/Point.js";import s from"./DrawAction.js";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import r from"../../geometry/Point.js";import s from"./DrawAction.js";import{CursorUpdateEvent as o}from"./input/CursorUpdateEvents.js";import{DrawCompleteEvent as n}from"./input/DrawCompleteEvent.js";import{VertexAddEvent as a}from"./input/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 u=["freehand","click"];let v=class extends s{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 o(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 o(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:u})],v.prototype,"mode",void 0),v=e([i("esri.views.draw.SegmentDrawAction")],v);const w=v;export{w 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 t{constructor(t,e,s,i=null){this.view=t,this.coordinates=null,this.defaultPrevented=!1,this.type="cursor-update",this.coordinates=1===s.length?s[0]:null,this.vertexIndex=e,this.vertices=s,this.mapPoint=i}preventDefault(){this.defaultPrevented=!0}}export{t as CursorUpdateEvent};
|
|
@@ -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 t{constructor(t){this.vertices=t,this.coordinates=null,this.defaultPrevented=!1,this.type="draw-complete",this.coordinates=1===t.length?t[0]:null}preventDefault(){this.defaultPrevented=!0}}export{t as DrawCompleteEvent};
|
|
@@ -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-add",this.vertexIndex=t,this.vertices=s}preventDefault(){this.defaultPrevented=!0}}export{e as VertexAddEvent};
|
|
@@ -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,r){this.view=e,this.defaultPrevented=!1,this.type="vertex-remove",this.vertexIndex=t,this.vertices=r}preventDefault(){this.defaultPrevented=!0}}export{e as VertexRemoveEvent};
|
|
@@ -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-update",this.vertexIndex=t,this.vertices=s}preventDefault(){this.defaultPrevented=!0}}export{e as VertexUpdateEvent};
|
|
@@ -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{__decorate as t,__addDisposableResource as e,__disposeResources as s}from"tslib";import r from"../../../core/Accessor.js";import{disposable as o}from"../../../core/handleUtils.js";import{addMany as i,deleteMany as n}from"../../../core/SetUtils.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{trackAccess as p}from"../../../core/accessorSupport/tracking.js";import{SimpleObservable as h}from"../../../core/accessorSupport/tracking/SimpleObservable.js";import{Part as l,EditGeometry as d}from"./EditGeometry.js";import{EditGeometryOperations as u}from"./EditGeometryOperations.js";import{ReplayableAppendVertex as y}from"./operations/ReplayableAppendVertex.js";import{UndoGroup as f}from"./operations/UndoGroup.js";class m extends u{constructor(t,e,s){super(t,e,s),this._checkpoints=[],this._observable=new h,this._suppressChangeEvents=!1}createCheckpoint(t,e){const s=new _({data:this.data,status:t,geometryType:e});return this._checkpoints.push(s),s}completeCheckpoint(t){const e=t?this._checkpoints.indexOf(t):-1;if(e<0||!t)return null;this._checkpoints.splice(e,1);const s=e-1,r=s>-1?this._checkpoints.at(s):void 0;return r?.merge(t)??t.destroy(),this._checkpoints.forEach(t=>"committed"===t.status&&t.redoStack?.splice(0)),this._observable.notify(),null}cancelCheckpoint(t){const e=t?this._checkpoints.indexOf(t):-1;if(e<0||!t)return null;this._checkpoints.splice(e,1);return t.close().undo(),this._observable.notify(),null}undo(){const t=this._checkpoints.findLast(t=>"committed"===t.status&&t.undoStack?.length);if(!t)return null;const e=this._checkpoints.filter(t=>"committed"!==t.status).reverse(),s=this._suppressEvents(()=>e.map(t=>({cp:t,ops:t.rewind()})));try{return t?.undo()}finally{s&&this._suppressEvents(()=>{for(const{cp:t,ops:e}of s)t.replay(e)}),this._observable.notify(),this._checkpoints.forEach(t=>t.notify())}}redo(){const t=this._checkpoints.find(t=>"committed"===t.status&&t.redoStack?.length);if(!t)return null;const e=this._checkpoints.filter(t=>"committed"!==t.status).reverse(),s=this._suppressEvents(()=>e.map(t=>({cp:t,ops:t.rewind()})));try{return t?.redo()}finally{s&&this._suppressEvents(()=>{for(const{cp:t,ops:e}of s)t.replay(e)}),this._observable.notify(),this._checkpoints.forEach(t=>t.notify())}}emit(t,e){return!this._suppressChangeEvents&&super.emit(t,e)}appendVertex(t,e){return e??=new l(this.data.spatialReference,this.viewingMode),this._apply(new y(this.data,e,t))}appendVertexToFirstPart(t){const e=this.data.parts.at(0);return e?this._apply(new y(this.data,e,t)):null}get canUndo(){return p(this._observable),this._checkpoints.some(t=>"committed"===t.status&&t.undoStack?.length)}get canRedo(){return p(this._observable),this._checkpoints.some(t=>"committed"===t.status&&t.redoStack?.length)}get lastOperation(){return p(this._observable),this._checkpoints?.findLast(t=>(t.undoStack?.length??0)>0)?.undoStack?.at(-1)}_apply(t,e=1){const s=this._checkpoints.at(-1);if(!s)return t;const r=s.undoStack?.at(-1);try{if(0!==e&&null!=r&&r.accumulate(t))s.notify();else{const e=k(t,this.data,"apply");s.undoStack?.push(t),s.syncOwnVertices(e),s.redoStack?.splice(0)}}finally{this._observable.notify()}return t}get test(){const{_checkpoints:t,_undoStack:e,_redoStack:s}=this;return{checkpoints:t,undoStack:e,redoStack:s}}_suppressEvents(t){this._suppressChangeEvents=!0;try{return t()}finally{this._suppressChangeEvents=!1}}static fromGeometry(t,e,s){return new m(d.fromGeometry(t,e,s),e,!!s?.allowCurves)}}let _=class extends r{constructor(t){super(t),this.undoStack=[],this.redoStack=[],this._ownVertices=new Set,this.data=null,this.status=t.status,this.geometryType=t.geometryType}destroy(){this.undoStack=null,this.redoStack=null,this._ownVertices.clear(),this.data=null}get finalVertex(){return this._finalVertex}get geometry(){const t=this._startingVertex?.leftSegment?.leftVertex??this._startingVertex;return t||this._finalVertex?this.data?.getPartialGeometry(t,this._finalVertex,this.geometryType):null}undo(){const t=this.undoStack?.pop();return t&&this.data&&(this.syncOwnVertices(k(t,this.data,"undo")),this.redoStack?.push(t)),this.notify(),t}redo(){const t=this.redoStack?.pop();return t&&this.data&&(this.syncOwnVertices(k(t,this.data,"redo")),this.undoStack?.push(t)),this.notify(),t}rewind(){const t=[];let e=this.undoStack?.pop();for(;e;)e.undo(),t.push(e),e=this.undoStack?.pop();return t}replay(t){let e=t.pop();for(;e;)e.apply(),this.undoStack?.push(e),e=t.pop();this.notify()}syncOwnVertices(t){const e=this._ownVertices;for(const o of t){const{addedVertices:t,removedVertices:s}=o;i(e,t),n(e,s)}let s=null,r=null;for(const o of e)(!s||o.part.index<s.part.index||o.part.index===s.part.index&&o.index<=s.index)&&(s=o),(!r||o.part.index>r.part.index||o.part.index===r.part.index&&o.index>r.index)&&(r=o);this._startingVertex=s,this._finalVertex=r}close(){const t=new f(this.undoStack??[]);return this.destroy(),t}merge(t){i(this._ownVertices,t._ownVertices),this.undoStack?.push(t.close()),this.redoStack?.splice(0),this.syncOwnVertices([]),this.notify()}notify(){this.notifyChange("geometry")}get test(){const{_finalVertex:t,_startingVertex:e,_ownVertices:s}=this;return{finalVertex:t,startingVertex:e,ownedVertices:s}}};function k(t,r,i){const n={stack:[],error:void 0,hasError:!1};try{const s=[];e(n,o(r.on("change",t=>s.push(t))),!1);switch(i){case"apply":case"redo":t.apply();break;case"undo":t.undo()}return s}catch(c){n.error=c,n.hasError=!0}finally{s(n)}}t([c({constructOnly:!0})],_.prototype,"status",void 0),t([c({constructOnly:!0})],_.prototype,"geometryType",void 0),t([c()],_.prototype,"data",void 0),t([c()],_.prototype,"finalVertex",null),t([c()],_.prototype,"geometry",null),t([c()],_.prototype,"_startingVertex",void 0),t([c()],_.prototype,"_finalVertex",void 0),_=t([a("esri.views.interactive.editGeometry.CheckpointingEditGeometryOperations")],_);export{_ as Checkpoint,m as CheckpointingEditGeometryOperations};
|
|
@@ -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{equals as t}from"../../../core/arrayUtils.js";import{neverReached as
|
|
5
|
+
import{equals as t,pushIfSome as e}from"../../../core/arrayUtils.js";import{neverReached as r}from"../../../core/compilerUtils.js";import{Evented as i}from"../../../core/Evented.js";import s from"../../../geometry/Multipoint.js";import n from"../../../geometry/Polygon.js";import o from"../../../geometry/Polyline.js";import{getEndpoint as h,isCoordinate as a,isBezierCurve as c,isCircularArc as l,isEllipticArc4 as p}from"../../../geometry/support/curves/curveUtils.js";import{createCoordinateHelper as u}from"../coordinateHelper.js";import{unnormalize as g,getUnnormalizationInfo as f}from"./unnormalizationHelper.js";class m{constructor(t){this.part=t,this.leftSegment=null,this.rightSegment=null,this.type="vertex",this.index=null}get pos(){return this._pos}set pos(t){this._pos=t,this.part.unnormalizeVertexPositions()}}class d{constructor(t,e,r){this.part=t,this.leftVertex=e,this.rightVertex=r,this.type="line",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){return[...this.rightVertex.pos]}}class v{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="bezier",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){return{b:[[...this.rightVertex.pos],[...this.curveDefinition.controlPoint1],[...this.curveDefinition.controlPoint2]]}}}class y{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="circular-arc",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{interiorPoint:e}=this.curveDefinition;return{c:[[...t],[...e]]}}}class x{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="elliptic-arc-4",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{centerPoint:e,sweep:r,orientation:i}=this.curveDefinition;return{a:[[...t],[...e],r,i]}}}class V{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="elliptic-arc-7",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{centerPoint:e,sweep:r,orientation:i,rotation:s,semiMajorAxisLength:n,minorMajorAxisRatio:o}=this.curveDefinition;return{a:[[...t],e,r,i,s,n,o]}}}class w{constructor(t,e,r=!1){this._spatialReference=t,this._viewingMode=e,this.autoClose=r,this.vertices=[],this.segments=[],this.index=null}unnormalizeVertexPositions(){this.vertices.length<=1||g(this.vertices,f(this._spatialReference,this._viewingMode))}updateVertexIndex(t,e){const{vertices:r}=this;if(0===r.length)return;const i=r[0];let s=null,n=t,o=e;do{s=n,s.index=o++,n=s.rightSegment?s.rightSegment.rightVertex:null}while(null!=n&&n!==i);s.leftSegment&&s!==r[r.length-1]&&this.swapVertices(r.indexOf(s),r.length-1)}getFirstVertex(){return this.vertices.at(0)}getLastVertex(){return this.vertices.at(-1)}isClosed(){return null!=this.getFirstVertex()?.leftSegment}swapVertices(t,e){const{vertices:r}=this,i=r[t];r[t]=r[e],r[e]=i}*iterateVertices(){const t=this.getFirstVertex();let e=t;if(e)do{yield e,e=e.rightSegment?.rightVertex}while(e!==t&&null!=e)}}class P extends i{constructor(t,e){super(),this.type=t,this.coordinateHelper=e,this._geometry=null,this._dirty=!0,this.parts=[]}get geometry(){if(this._dirty){switch(this.type){case"point":this._geometry=this._toPoint();break;case"multipoint":this._geometry=this._toMultipoint();break;case"polyline":this._geometry=this._toPolyline();break;case"polygon":this._geometry=this._toPolygon();break;case"mesh":break;default:r(this.type)}this._dirty=!1}return this._geometry}get spatialReference(){return this.coordinateHelper.spatialReference}get allVerticesUnordered(){return Array.from(this.iterateVerticesUnordered())}*iterateVerticesUnordered(){for(const t of this.parts)for(const e of t.vertices)yield e}get allVertices(){return Array.from(this.iterateVertices())}*iterateVertices(){for(const t of this.parts)yield*t.iterateVertices()}notifyChanges(t){this._dirty=!0,this.emit("change",t)}getPartialGeometry(t,e,r){const{parts:i,hasCurves:s}=M(this,{startingVertex:t,endingVertexInclusive:e,geometryType:r});return R(i,s,r,this.coordinateHelper)}_toPoint(){const{parts:t,coordinateHelper:e}=this;return t.at(0)?.vertices.length?e.vectorToPoint(t[0].vertices[0].pos):null}_toMultipoint(){const t=[],{coordinateHelper:e,parts:r,spatialReference:i}=this;for(const s of r){const r=s.getFirstVertex();r&&t.push(e.arrayToVector(r.pos))}return new s({hasM:e.hasM(),hasZ:e.hasZ(),spatialReference:i,points:t})}_toPolyline(){const t=[];let e=!1;for(const r of this.parts){if(r.vertices.length<1)continue;const i=r.vertices[0],s=[];s.push(i.pos);let n=i.rightSegment;for(;n;)e||="line"!==n.type,s.push(n.toCurveOrCoordinate()),n=n.rightVertex.rightSegment;t.push(s)}return new o({paths:e?void 0:t,curvePaths:e?t:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}_toPolygon(){const e=[];let r=!1;for(const i of this.parts){if(i.vertices.length<1)continue;const s=i.vertices[0],n=[];n.push(s.pos);let o=s.rightSegment;for(;o&&(r||="line"!==o.type,n.push(o.toCurveOrCoordinate()),o=o.rightVertex.rightSegment,o?.leftVertex!==s););if(i.autoClose&&n.length>1){const e=n.at(-1),r=h(n[0]),i=h(e);2===n.length&&a(e)||t(r,i)||n.push(r)}e.push(n)}return new n({rings:r?void 0:e,curveRings:r?e:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}static fromGeometry(t,e,r){const i=t.spatialReference,s=u(t.hasZ,t.hasM,i),n=new P(t.type,s);switch(t.type){case"polygon":S(n,t,e,r?.allowCurves??!1);break;case"polyline":b(n,t,e,r?.allowCurves??!1);break;case"point":H(n,t,e);break;case"multipoint":j(n,t,e);break;case"mesh":H(n,t.origin,e),n._geometry=t,n._dirty=!1}return n}}function _(t,e,r,i){const s=new m(t);t.vertices.push(s);const n=h(i);return s.pos=e.arrayToVector(n),s.index=t.vertices.length-1,r&&t.segments.push(C(t,r,s,i)),s}function C(t,e,r,i){if(a(i))return new d(t,e,r);if(c(i)){const[,s,n]=i.b;return new v(t,e,r,{controlPoint1:[...s],controlPoint2:[...n]})}if(l(i)){const[,s]=i.c;return new y(t,e,r,{interiorPoint:[...s]})}if(p(i)){const[,s,n,o]=i.a;return new x(t,e,r,{centerPoint:[...s],sweep:n,orientation:o})}const[,s,n,o,h,u,g]=i.a;return new V(t,e,r,{centerPoint:[...s],sweep:n,orientation:o,rotation:h,semiMajorAxisLength:u,minorMajorAxisRatio:g})}function R(t,e,r,i){const{spatialReference:a}=i;if("point"===r){const e=t.at(0)?.at(0);return e?i.arrayToPoint(h(e)):null}return"polygon"===r?new n({rings:e?void 0:t,curveRings:e?t:void 0,spatialReference:a,hasZ:i.hasZ(),hasM:i.hasM()}):"multipoint"===r?new s({spatialReference:a,points:t.flatMap(t=>t.map(t=>h(t))),hasM:i.hasM(),hasZ:i.hasZ()}):new o({paths:e?void 0:t,curvePaths:e?t:void 0,spatialReference:a,hasZ:i.hasZ(),hasM:i.hasM()})}function M(r,i){const s="polygon"===(i?.geometryType??r.type),n=[];let o=!1,c=!1,l=!1;for(const p of r.parts){let r=null;if(l)break;if(p.vertices.length<1)continue;if(i?.startingVertex){if(p!==i.startingVertex.part&&!c)continue;c=!0}const u=p===i?.startingVertex?.part?i.startingVertex:p.vertices.at(0),g=[];if(e(g,u?.pos),u===i?.endingVertexInclusive){l=!0,r=u,n.push(g);break}let f=u?.rightSegment;for(;f;){if(o||="line"!==f.type,g.push(f.toCurveOrCoordinate()),r=f.rightVertex,f.rightVertex===i?.endingVertexInclusive){l=!0;break}if(f=f.rightVertex.rightSegment,f?.leftVertex===u)break}const m=g.at(-1),d=p.getFirstVertex(),v=p.getLastVertex();s&&p.autoClose&&m&&r===v&&u===d&&(g.length>2||2===g.length&&!a(m))&&u?.pos&&!t(h(m),u.pos)&&g.push([...u.pos]),n.push(g)}return{parts:n,hasCurves:o}}function S(e,r,i,s){const n=r.spatialReference,o=e.coordinateHelper,{rings:a,curveRings:c}=r,l=c&&s?c:a;for(let p=0;p<l.length;++p){const r=l[p],s=new w(n,i);if(s.index=p,e.parts.push(s),r.length<1)continue;let a=null,c=null;for(let t=0;t<r.length-1;++t)c=_(s,o,c,r[t]),a??=c;r.length>1&&t(h(r[r.length-1]),a?.pos)?c&&a&&s.segments.push(C(s,c,a,r[r.length-1])):c=_(s,o,c,r[r.length-1])}}function b(t,e,r,i){const s=e.spatialReference,n=t.coordinateHelper,{curvePaths:o,paths:h}=e,a=o&&i?o:h;for(let c=0;c<a.length;++c){const e=a[c],i=new w(s,r);if(i.index=c,t.parts.push(i),e.length<1)continue;let o=null;for(let t=0;t<e.length;++t)o=_(i,n,o,e[t])}}function H(t,e,r){const i=e.spatialReference,s=t.coordinateHelper,n=new w(i,r);n.index=0;const o=new m(n);o.index=0,o.pos=s.pointToVector(e),n.vertices.push(o),t.parts.push(n)}function j(t,e,r){const i=e.spatialReference,{coordinateHelper:s,parts:n}=t,o=e.points.map(t=>s.arrayToVector(t));for(let h=0;h<o.length;h++){const t=new w(i,r);t.index=h,n.push(t);const e=new m(t);e.pos=o[h],e.index=0,t.vertices.push(e)}}function k(t){return"mesh"===t.type}export{v as BezierSegment,y as CircularArcSegment,P as EditGeometry,x as EllipticArc4Segment,V as EllipticArc7Segment,d as LineSegment,w as Part,m as Vertex,C as createConnectingSegment,k as isMeshEditGeometry,R as partialCoordsToGeometry,M as toPartialCoords};
|
|
@@ -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{getEndpoint as e}from"../../../../geometry/support/curves/curveUtils.js";import{Vertex as t,createConnectingSegment as s,LineSegment as i}from"../EditGeometry.js";import{AppendVertex as r}from"./AppendVertex.js";class d extends r{apply(){let r="redo";const{_part:d,_editGeometry:n,_posOrCurveDef:l}=this;if(null==this._addedVertex&&(r="apply",this._addedVertex=new t(d)),!n.parts.includes(d)){this._partAdded=!0;const e=n.parts.at(-1)?.index??-1;d.index=e+1,n.parts.push(d)}const h=d.getLastVertex(),a=n.coordinateHelper.arrayToVector(e(l));if(null==h)this._addedVertex.leftSegment=null,this._addedVertex.rightSegment=null,d.vertices.push(this._addedVertex),this._addedVertex.pos=a,this._addedVertex.index=0;else{let e=null;h.rightSegment&&(this._originalSegment=h.rightSegment,e=this._originalSegment.rightVertex,d.segments.splice(d.segments.indexOf(this._originalSegment),1)),d.vertices.push(this._addedVertex),this._addedVertex.pos=a,this._left=s(d,h,this._addedVertex,l),d.segments.push(this._left),h.rightSegment=this._left,null!=e&&(this._right=new i(this._part,this._addedVertex,e),this._part.segments.push(this._right),e.leftSegment=this._right),d.updateVertexIndex(this._addedVertex,h.index+1)}n.notifyChanges({operation:r,addedVertices:[this._addedVertex]})}undo(){const{_part:e,_addedVertex:t,_left:s,_right:i,_originalSegment:r}=this;if(null!=t){if(e.vertices.splice(e.vertices.indexOf(t),1),null!=s){const t=e.segments.indexOf(s);t>-1&&e.segments.splice(t,1),s.leftVertex.rightSegment=null}if(null!=i){const t=e.segments.indexOf(i);t>-1&&e.segments.splice(t,1),i.rightVertex.leftSegment=null}if(null!=r&&(e.segments.includes(r)||e.segments.push(r),r.leftVertex.rightSegment=r,r.rightVertex.leftSegment=r),null!=s?e.updateVertexIndex(s.leftVertex,s.leftVertex.index):e.updateVertexIndex(t,0),this._partAdded&&0===this._part.vertices.length){const e=this._editGeometry.parts.indexOf(this._part);e>-1&&this._editGeometry.parts.splice(e)}this._editGeometry.notifyChanges({operation:"undo",removedVertices:[t]})}}accumulate(){return!1}}export{d as ReplayableAppendVertex};
|
|
@@ -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 t from"../../../../core/Accessor.js";import{createTask as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import{destroyHandle as r}from"../../../../core/handleUtils.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfAborted as o,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{initial as n,on as l,watch as d,sync as p,syncAndInitial as u}from"../../../../core/reactiveUtils.js";import{sqlAnd as h}from"../../../../core/sql.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as y}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as f}from"../../../../core/support/UpdatingHandles.js";import{isSubtypeGroupLayer as m}from"../../../../layers/support/layerUtils.js";import{elevationContextAffectsAlignment as _}from"../../../../support/elevationInfoUtils.js";import{FeatureServiceTiles2D as g}from"../../../2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js";import{FeatureServiceTiles3D as w}from"../../../3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js";import{isUtilityNetworkWebMap as S}from"../snappingUtils.js";import{makeGetGroundElevation as v,convertSnappingCandidate as H}from"./queryEngineUtils.js";import{WorkerTileTreeDebugger as I}from"./WorkerTileTreeDebugger.js";import{FeatureServiceSnappingSourceWorkerHandle as b}from"./featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js";import{FeatureServiceTilesSimple as F}from"./featureServiceSource/FeatureServiceTilesSimple.js";import j from"../../../support/debugFlags.js";let O=class extends t{get _updateTilesParameters(){return{tiles:this._tilesOfInterest.tiles,tileInfo:this._tilesOfInterest.tileInfo,tileSize:this._tilesOfInterest.tileSize}}get _layerView(){return this.view?.allLayerViews.find(e=>e.layer===this._layer)}get _isSuspended(){if(m(this._layer)){if(!this.layerSource.sublayerSources.some(e=>e.enabled&&e.layer.visible))return!0}return this._snappingComplexityExceeded||!!this.view&&(!1!==this._layerView?.suspended||!this.layerSource.enabled)}get _snappingComplexityExceeded(){return!(!this._layerView||!("snappingComplexityExceeded"in this._layerView))&&this._layerView.snappingComplexityExceeded}get updating(){return this._workerHandle?.updating||this._updatingHandles.updating||this._tilesOfInterest.updating}get _outFields(){const{view:e,_layerView:t,layerSource:i}=this,{layer:r}=i,{fieldsIndex:s,timeInfo:o,floorInfo:a,subtypeField:n}=r,l=t&&"filter"in t?t.filter:null,d=l?.where&&"1=1"!==l.where?this._getOrLoadWhereFields(l.where,s):[];if(l?.timeExtent&&o){const{startField:e,endField:t}=o,i=s.get(e)?.name??e,r=s.get(t)?.name??t;i&&d.push(i),r&&d.push(r)}if(e?.map&&S(e.map)&&e.map.utilityNetworks?.find(e=>e.isUtilityLayer(r))){const e=r.fieldsIndex.get("assetGroup")?.name,t=r.fieldsIndex.get("assetType")?.name;e&&t&&(d.push(e),d.push(t))}if(r&&a?.floorField&&e?.floors?.length){const e=s.get(a.floorField)?.name??a.floorField;e&&d.push(e)}if(n){const e=s.get(n)?.name??n;e&&d.push(e)}return new Set(d)}get configuration(){const{view:e}=this,{apiKey:t,customParameters:i}=this._layer,r=null!=e?e.type:"2d",s=this._layer.createQuery();return this._layerView&&"effectiveDisplayFilter"in this._layerView&&(s.where=h(s.where,this._layerView.effectiveDisplayFilter?.where)),{filter:s,customParameters:t?{...i,token:t}:i,viewType:r}}get availability(){return this._workerHandle?.availability??0}get _layer(){return this.layerSource.layer}constructor(e){super(e),this._updatingHandles=new f,this._workerHandle=null,this._debug=null,this._memoizedMakeGetGroundElevation=s(v)}initialize(){let e;const t=this.view;if(null==t||t.destroyed)this._tilesOfInterest=new F({layer:this._layer}),e=this._workerHandle=new b;else switch(t.type){case"2d":this._tilesOfInterest=new g({view:t,layer:this._layer}),e=this._workerHandle=new b;break;case"3d":{const{resourceController:i}=t,r=this._layer;this._tilesOfInterest=new w({view:t}),e=this._workerHandle=new b({schedule:e=>i.immediate.schedule(e),hasZ:r.hasZ&&(r.returnZ??!0),elevationAlignPointsInFeatures:async(e,i)=>{const s=await t.whenLayerView(r);return o(i),s.elevationAlignPointsInFeatures(e,i)},queryForSymbologySnapping:async(e,i)=>{const s=await t.whenLayerView(r);return o(i),s.queryForSymbologySnapping(e,i)}}),this._updatingHandles.add(()=>r.elevationInfo,()=>a(e.notifyElevationSourceChange()),n),this._updatingHandles.add(()=>this._layerView?.layer?.renderer,()=>a(e.notifySymbologyChange()),n),this._updatingHandles.add(()=>this._layerView?.symbologySnappingSupported??!1,t=>a(e.setSymbologySnappingSupported(t)),n),this.addHandles([t.elevationProvider.on("elevation-change",({context:t})=>{const{elevationInfo:i}=r;_(t,i)&&a(e.notifyElevationSourceChange())}),l(()=>this._layerView?.layer,["edits","apply-edits","graphic-update"],()=>e.notifySymbologyChange())]);break}}this.addHandles([r(e)]),a(e.setup({layer:this._layer,spatialReference:this.spatialReference,configuration:this.configuration},null)),this._updatingHandles.add(()=>this._updateTilesParameters,()=>a(e.updateTiles(this._updateTilesParameters,null)),n),this.addHandles([d(()=>this.configuration,t=>a(e.configure(t,null)),p),d(()=>this._layer.historicMoment,t=>a(e.setHistoricMoment(t)),u),d(()=>this._isSuspended,t=>a(e.setSuspended(t)),u)]),this._updatingHandles.add(()=>this._outFields,t=>a(e.updateOutFields(t)),n),null!=t&&this.addHandles(d(()=>j.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES,i=>{i&&!this._debug?(this._debug=new I({view:t,handle:e}),this.addHandles(r(this._debug),"debug")):!i&&this._debug&&this.removeHandles("debug")},n)),this.addHandles([this.layerSource.layer.on("edits",t=>a(e.handleEdits(t,null))),this.layerSource.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))])}destroy(){this._updatingHandles.destroy(),this._tilesOfInterest.destroy()}refresh(){this._workerHandle?.refresh(null)}async fetchCandidates(e,t){if(this._isSuspended)return[];const{coordinateHelper:i,point:r}=e;this._tilesOfInterest.pointOfInterest=i.arrayToPoint(r);const s=this._memoizedMakeGetGroundElevation(this.view,i.spatialReference);return(await this._workerHandle.fetchCandidates({...e},t)).candidates.map(e=>H(e,s))}getDebugInfo(e){return this._workerHandle.getDebugInfo(e)}_getOrLoadWhereFields(e,t){const{_whereModule:r}=this;if(!this._loadWhereModuleTask&&!r){const e=i(async()=>{const e=await import("../../../../core/sql/WhereClause.js");return this._whereModule=e.default,this._whereModule});return this._loadWhereModuleTask=e,this._updatingHandles.addPromise(e.promise),[]}if(!r)return[];try{return r.create(e,{fieldsIndex:t}).fieldNames}catch(s){return[]}}};e([c({constructOnly:!0})],O.prototype,"spatialReference",void 0),e([c({constructOnly:!0})],O.prototype,"layerSource",void 0),e([c({constructOnly:!0})],O.prototype,"view",void 0),e([c()],O.prototype,"_tilesOfInterest",void 0),e([c({readOnly:!0})],O.prototype,"_updateTilesParameters",null),e([c()],O.prototype,"_layerView",null),e([c()],O.prototype,"_isSuspended",null),e([c()],O.prototype,"_snappingComplexityExceeded",null),e([c({readOnly:!0})],O.prototype,"updating",null),e([c()],O.prototype,"_outFields",null),e([c({readOnly:!0})],O.prototype,"configuration",null),e([c({readOnly:!0})],O.prototype,"availability",null),e([c()],O.prototype,"_loadWhereModuleTask",void 0),e([c()],O.prototype,"_whereModule",void 0),O=e([y("esri.views.interactive.snapping.featureSources.FeatureServiceSnappingSource")],O);export{O as FeatureServiceSnappingSource};
|
|
@@ -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 t from"../../../../../core/Accessor.js";import{isSome as o}from"../../../../../core/arrayUtils.js";import{abortMaybe as i}from"../../../../../core/maybe.js";import{debounce as n}from"../../../../../core/promiseUtils.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as s}from"../../../../../core/support/UpdatingHandles.js";import{WorkerHandle as d}from"../../../../../core/workers/WorkerHandle.js";import{featureGeometryTypeKebabDictionary as l}from"../../../../../geometry/support/typeUtils.js";import{makeDehydratedPoint as p}from"../../../../../layers/graphics/dehydratedPoint.js";let u=class extends t{get updating(){return this._updatingHandles.updating||this._workerHandleUpdating}constructor(e){super(e),this._updatingHandles=new s,this._suspendController=null,this.schedule=null,this.hasZ=!1,this.elevationAlignPointsInFeatures=async e=>{const t=[];for(const{points:o}of e.pointsInFeatures)for(const{z:e}of o)t.push(e);return{elevations:t,drapedObjectIds:new Set,failedObjectIds:new Set}},this.queryForSymbologySnapping=async()=>({candidates:[],sourceCandidateIndices:[]}),this.availability=0,this._workerHandleUpdating=!0,this.updateOutFields=n(async(e,t)=>{await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("updateOutFields",[...e],t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))})}destroy(){this._suspendController=i(this._suspendController),this._workerHandle.destroy(),this._updatingHandles.destroy()}initialize(){this._workerHandle=new
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{isSome as o}from"../../../../../core/arrayUtils.js";import{abortMaybe as i}from"../../../../../core/maybe.js";import{debounce as n}from"../../../../../core/promiseUtils.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as s}from"../../../../../core/support/UpdatingHandles.js";import{WorkerHandle as d}from"../../../../../core/workers/WorkerHandle.js";import{featureGeometryTypeKebabDictionary as l}from"../../../../../geometry/support/typeUtils.js";import{makeDehydratedPoint as p}from"../../../../../layers/graphics/dehydratedPoint.js";let u=class extends t{get updating(){return this._updatingHandles.updating||this._workerHandleUpdating}constructor(e){super(e),this._updatingHandles=new s,this._suspendController=null,this.schedule=null,this.hasZ=!1,this.elevationAlignPointsInFeatures=async e=>{const t=[];for(const{points:o}of e.pointsInFeatures)for(const{z:e}of o)t.push(e);return{elevations:t,drapedObjectIds:new Set,failedObjectIds:new Set}},this.queryForSymbologySnapping=async()=>({candidates:[],sourceCandidateIndices:[]}),this.availability=0,this._workerHandleUpdating=!0,this.updateOutFields=n(async(e,t)=>{await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("updateOutFields",[...e],t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))})}destroy(){this._suspendController=i(this._suspendController),this._workerHandle.destroy(),this._updatingHandles.destroy()}initialize(){this._workerHandle=new g(this.schedule,{alignElevation:async(e,{signal:t})=>({result:await this.elevationAlignPointsInFeatures(e.query,t)}),getSymbologyCandidates:async(e,{signal:t})=>({result:await this.queryForSymbologySnapping(e,t)})}),this.addHandles([this._workerHandle.on("notify-updating",({updating:e})=>this._workerHandleUpdating=e),this._workerHandle.on("notify-availability",({availability:e})=>this._set("availability",e))])}async setup(e,t){const o=c(e.layer);if(null==o)return;const i={configuration:h(e.configuration),serviceInfo:o,spatialReference:e.spatialReference.toJSON(),hasZ:this.hasZ,elevationInfo:e.layer.elevationInfo?.toJSON()};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setup",i,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async configure(e,t){const o=h(e);await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("configure",o,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async refresh(e){await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("refresh",{},e)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},e))}async fetchCandidates(e,t){const{point:o,filter:i,coordinateHelper:n}=e,a={...e,point:p(o[0],o[1],o[2],n.spatialReference.toJSON()),filter:i?.toJSON()};return this._workerHandle.invoke(a,t)}async updateTiles(e,t){const o={tiles:e.tiles.map(e=>e.toJSON()),tileInfo:null!=e.tileInfo?e.tileInfo.toJSON():null,tileSize:e.tileSize};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("updateTiles",o,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async handleEdits({historicMoment:e,addedFeatures:t,deletedFeatures:i,updatedFeatures:n},a){const r={historicMoment:e,addedFeatures:t?.map(({objectId:e})=>e).filter(o)??[],deletedFeatures:i?.map(({objectId:e,globalId:t})=>({objectId:e,globalId:t}))??[],updatedFeatures:n?.map(({objectId:e})=>e).filter(o)??[]};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("handleEdits",r,a)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},a))}async setHistoricMoment(e,t){await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setHistoricMoment",{moment:e},t))}getDebugInfo(e){return this._workerHandle.invokeMethod("getDebugInfo",{},e)}async notifyElevationSourceChange(){await this._workerHandle.invokeMethod("notifyElevationSourceChange",{})}async notifySymbologyChange(){await this._workerHandle.invokeMethod("notifySymbologyChange",{})}async setSymbologySnappingSupported(e){await this._workerHandle.invokeMethod("setSymbologySnappingSupported",e)}async setSuspended(e){this._suspendController?.abort(),this._suspendController=new AbortController,await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setSuspended",e,this._suspendController.signal))}};function h(e){return{filter:null!=e.filter?e.filter.toJSON():null,customParameters:e.customParameters,viewType:e.viewType}}function c(e){return"multipatch"===e.geometryType||"mesh"===e.geometryType?null:{url:e.parsedUrl?.path??"",fieldsIndex:e.fieldsIndex.toJSON(),geometryType:l.toJSON(e.geometryType),capabilities:e.capabilities,objectIdField:e.objectIdField,globalIdField:e.globalIdField,spatialReference:e.spatialReference.toJSON(),timeInfo:e.timeInfo?.toJSON()}}e([a({constructOnly:!0})],u.prototype,"schedule",void 0),e([a({constructOnly:!0})],u.prototype,"hasZ",void 0),e([a({constructOnly:!0})],u.prototype,"elevationAlignPointsInFeatures",void 0),e([a({constructOnly:!0})],u.prototype,"queryForSymbologySnapping",void 0),e([a({readOnly:!0})],u.prototype,"updating",null),e([a({readOnly:!0})],u.prototype,"availability",void 0),e([a()],u.prototype,"_workerHandleUpdating",void 0),u=e([r("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorkerHandle")],u);class g extends d{constructor(e,t){super("FeatureServiceSnappingSourceWorker","fetchCandidates",{},e,{strategy:"dedicated",client:t})}}export{u as FeatureServiceSnappingSourceWorkerHandle};
|
package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js
CHANGED
|
@@ -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 t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{intersection as s,isSubsetOf as i}from"../../../../../core/SetUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{create as n,intersects as l,fromExtent as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{intersection as s,isSubsetOf as i}from"../../../../../core/SetUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{create as n,intersects as l,fromExtent as u,area as c}from"../../../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as h}from"../../../../../layers/graphics/featureConversionUtils.js";import{BoundsStore as a}from"../../../../../layers/graphics/data/BoundsStore.js";import{TileKey as d}from"../../../../../layers/support/TileKey.js";import{executeQueryForCount as f}from"../../../../../rest/query/operations/query.js";import{FeatureServiceTileCache as _}from"./FeatureServiceTileCache.js";let m=class extends t{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new a,this._tiles=new _,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=n()}add(e,t){for(const s of t)this._referenceFeature(s.objectId);const i=this.featureStore.upsertMany(t),r=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>s(e,t),new Set(Object.keys(i[0]?.attributes??[]))),o=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),r),o&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds){if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}}return t}_hasAttributesForTile(e,t){if(e){const s=this._tiles.get(e);if(s)return!s.objectIds.size||i(t,s.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new y(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const{features:i}=await t(e,s);for(const r of i){const e=h(this._tmpBoundingRect,r.geometry);null!=e&&this._tileBounds.forEachInBounds(e,e=>{const t=this._tiles.get(e);this.featureStore.add(r);const s=r.objectId;t.objectIds.has(s)||(t.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(t.key.id,t.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!l(u(this.extent,this._tmpBoundingRect),e.extent))return new v(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new v(e);if(this._hasAttributesForTile(e.id,s))return new v(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await f(t,s,i),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const s=new g(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&p(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const o=t.row>>r,n=t.col>>r,l=e.row<<1,u=n-(e.col<<1)+(o-l<<1),c=e.children[u];if(null!=c)this._populateChildren(c,t,s,i);else{const r=new g(e.level+1,o,n);s.updateTileInfo(r,1),e.children[u]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const o=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),o);const n=r/2,l=n*n;let u=0;for(let c=0;c<e.children.length;c++){const s=e.children[c];u+=null!=s?this._simplify(s,t,e,c,n):l}return 0===u?this._mergeChildren(e):1-u/o<S&&(this._purge(e),null!=s&&(s.children[i]=null),u=o),u}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const r=this._tiles.get(e.id);if(r){i=i?s(i,r.attributeKeys):new Set(r.attributeKeys);for(const e of r.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new C(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,i);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let n=0;n<e.children.length;n++){const s=e.children[n];null==s?t.addMissing(e.level+1,(e.row<<1)+((2&n)>>1),(e.col<<1)+(1&n),o):this._collectMissingTilesRecurse(s,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};function p(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,o=1<<r.level-i.level;return Math.floor(r.row/o)===i.row&&Math.floor(r.col/o)===i.col}e([r({constructOnly:!0})],m.prototype,"featureStore",void 0),e([r()],m.prototype,"tileInfo",void 0),e([r()],m.prototype,"extent",void 0),e([r()],m.prototype,"maximumByteSize",void 0),m=e([o("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],m);class y{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class g extends d{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class v{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=c(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class C{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new v(t),null!=s&&(this._extent=u(s))}addMissing(e,t,s,i){const r=new d(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||l(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=c(r.extent))}}const S=.18751;export{m as FeatureServiceTileStore,v as ProcessResult};
|