@arcgis/core 4.28.0-next.20230821 → 4.28.0-next.20230823
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/Basemap.js +1 -1
- package/WebScene.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/portalUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0746319459dbcd3ab6f7.js +1 -0
- package/assets/esri/core/workers/chunks/{587437526ea77f764986.js → 0759d4ab9695096d2bbd.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0c4367a197b193e95d4.js → 10c014a6d8767ae8a666.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ffabd1a90c5b08109aa.js → 196937631ac20795e0ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{e05b54a0b834b4e4268e.js → 1c2b69dfcd0db58150e2.js} +1 -1
- package/assets/esri/core/workers/chunks/1c2f7c95825fdac790be.js +1 -0
- package/assets/esri/core/workers/chunks/1f9c80815f90fd0886d7.js +1 -0
- package/assets/esri/core/workers/chunks/217910f88fe2c03e6bdd.js +1 -0
- package/assets/esri/core/workers/chunks/238966b2fc6cc3dfcc05.js +1 -0
- package/assets/esri/core/workers/chunks/2c9f709d64954b3c1650.js +1 -0
- package/assets/esri/core/workers/chunks/35faede04d4539aab6e8.js +1 -0
- package/assets/esri/core/workers/chunks/3e3edcbacf8eaf275b97.js +1 -0
- package/assets/esri/core/workers/chunks/{b78dc6cbe14e5817b4d9.js → 4968018bc693c053fdd2.js} +1 -1
- package/assets/esri/core/workers/chunks/{c35b850fbfcb28133235.js → 49a1ba3e7ea204adeddb.js} +1 -1
- package/assets/esri/core/workers/chunks/{12b8fe0374fa9ab4ca09.js → 49cf3ae224f56f45f65b.js} +1 -1
- package/assets/esri/core/workers/chunks/5330040eeacc9c03fbdb.js +1 -0
- package/assets/esri/core/workers/chunks/54aaa21144431b29b6ed.js +1 -0
- package/assets/esri/core/workers/chunks/{6c40f16e6d10321295d8.js → 5b13d28cf5efc312a21c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d6c96a20e9640b433719.js → 67c6618339d323460d45.js} +57 -57
- package/assets/esri/core/workers/chunks/{dd86f43505b636eb41c0.js → 7714c16f9c8860efd461.js} +1 -1
- package/assets/esri/core/workers/chunks/{752d389c7bdcbe7004dc.js → 83e0af5522a672c2c73b.js} +1 -1
- package/assets/esri/core/workers/chunks/{873111ddf4813cdd4903.js → 872d0d4bf364be43a92e.js} +1 -1
- package/assets/esri/core/workers/chunks/8a784ddd5607f1ddbb5b.js +1 -0
- package/assets/esri/core/workers/chunks/{0cad2b991d0d0fd07846.js → 8c9c4162617f31e3f5f2.js} +1 -1
- package/assets/esri/core/workers/chunks/8db3ee2931be5cca3f5e.js +1 -0
- package/assets/esri/core/workers/chunks/{fd3920159ab9748402a2.js → 92350664e2719a9e860e.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff755962fd1c771f5be5.js → a3b461174984a1cb92b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd4c6d000222798a0317.js → a47aff9c97c5ce52d0dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{028534e3d4e13c9ea687.js → a645f08a7678f2ca037c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d9fe6cfbc9ad2920ca9c.js → aca45e54ec925002df9a.js} +1 -1
- package/assets/esri/core/workers/chunks/{40ff0e7c948615b8bfc0.js → b07d32a60307d04391fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdc703330bf194a48e0e.js → b086e798f43dacb0175f.js} +1 -1
- package/assets/esri/core/workers/chunks/bd0b9647880cbbec95e2.js +1 -0
- package/assets/esri/core/workers/chunks/{ab420bacdd63ee8fbd8b.js → bf9b5e2803a5444bd944.js} +1 -1
- package/assets/esri/core/workers/chunks/{c58ca2685eb7e559f428.js → c0a2a737a3085690afc5.js} +1 -1
- package/assets/esri/core/workers/chunks/{e04e8af4224fff8c3ec3.js → c34615c0b7ad83d1ad24.js} +1 -1
- package/assets/esri/core/workers/chunks/{05ab09713d599687afa3.js → d105ee2e394e2c48303c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ef03b78659c72de93076.js → d183144fa504064d23d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f5207abb034375927c7.js → d8495c6dcd4d9bec8dd6.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a485d63330f5e7fe4e3.js → dba61fa8cbb57dde54b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a306e3aa210861b8c17.js → deb0bd575c63d9dbcde5.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0a2f9ca338b60f2ba2a.js → e302fe771d92ccf945a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb0a5bc6deaa98026bb5.js → ed0dea88b2865fc6e06b.js} +1 -1
- package/assets/esri/core/workers/chunks/ed733eea5d065131b159.js +1 -0
- package/assets/esri/core/workers/chunks/{1c51c52fb2233153d7ae.js → f3ec53ee9567bb7e4d2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{4922a0fed7cbc6895882.js → f701a5afa1b730c51a49.js} +1 -1
- package/assets/esri/t9n/common.json +1 -1
- package/assets/esri/t9n/common_ar.json +1 -1
- package/assets/esri/t9n/common_bg.json +1 -1
- package/assets/esri/t9n/common_ca.json +1 -1
- package/assets/esri/t9n/common_cs.json +1 -1
- package/assets/esri/t9n/common_da.json +1 -1
- package/assets/esri/t9n/common_de.json +1 -1
- package/assets/esri/t9n/common_el.json +1 -1
- package/assets/esri/t9n/common_en.json +1 -1
- package/assets/esri/t9n/common_es.json +1 -1
- package/assets/esri/t9n/common_et.json +1 -1
- package/assets/esri/t9n/common_fi.json +1 -1
- package/assets/esri/t9n/common_fr.json +1 -1
- package/assets/esri/t9n/common_he.json +1 -1
- package/assets/esri/t9n/common_hr.json +1 -1
- package/assets/esri/t9n/common_hu.json +1 -1
- package/assets/esri/t9n/common_id.json +1 -1
- package/assets/esri/t9n/common_it.json +1 -1
- package/assets/esri/t9n/common_ja.json +1 -1
- package/assets/esri/t9n/common_ko.json +1 -1
- package/assets/esri/t9n/common_lt.json +1 -1
- package/assets/esri/t9n/common_lv.json +1 -1
- package/assets/esri/t9n/common_nb.json +1 -1
- package/assets/esri/t9n/common_nl.json +1 -1
- package/assets/esri/t9n/common_pl.json +1 -1
- package/assets/esri/t9n/common_pt-BR.json +1 -1
- package/assets/esri/t9n/common_pt-PT.json +1 -1
- package/assets/esri/t9n/common_ro.json +1 -1
- package/assets/esri/t9n/common_ru.json +1 -1
- package/assets/esri/t9n/common_sk.json +1 -1
- package/assets/esri/t9n/common_sl.json +1 -1
- package/assets/esri/t9n/common_sr.json +1 -1
- package/assets/esri/t9n/common_sv.json +1 -1
- package/assets/esri/t9n/common_th.json +1 -1
- package/assets/esri/t9n/common_tr.json +1 -1
- package/assets/esri/t9n/common_uk.json +1 -1
- package/assets/esri/t9n/common_vi.json +1 -1
- package/assets/esri/t9n/common_zh-CN.json +1 -1
- package/assets/esri/t9n/common_zh-TW.json +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +10 -17
- 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/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ar.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bg.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bs.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ca.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_cs.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_da.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_de.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_el.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_es.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_et.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fi.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_he.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hu.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_id.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_it.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ja.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ko.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lt.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lv.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nb.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nl.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pl.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-BR.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-PT.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ro.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ru.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sk.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sl.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sv.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_th.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_tr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_uk.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_vi.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-CN.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-HK.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-TW.json +1 -0
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
- package/chunks/ChapmanAtmosphere.glsl.js +1 -1
- package/chunks/Clouds.glsl.js +1 -1
- package/chunks/CloudsComposition.glsl.js +2 -2
- package/chunks/ComponentShader.glsl.js +36 -36
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/LaserlinePath.glsl.js +1 -1
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/NativeLine.glsl.js +8 -20
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/Precipitation.glsl.js +2 -2
- package/chunks/SSAOBlur.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/Stars.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +35 -35
- package/chunks/TextureOnly.glsl.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsPlanar.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/chunks/mat3.js +1 -1
- package/chunks/mat3f64.js +1 -1
- package/chunks/mat4.js +1 -1
- package/chunks/mat4f64.js +1 -1
- package/chunks/quat.js +1 -1
- package/chunks/quat2.js +1 -1
- package/chunks/quatf64.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/terrainUtilsPlanar.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec3f64.js +1 -1
- package/chunks/vec4.js +1 -1
- package/chunks/vec4f64.js +1 -1
- package/core/VectorStack.js +1 -1
- package/core/accessorSupport/decorators/persistable.js +1 -1
- package/core/accessorSupport/testSupport.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat4f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
- package/core/libs/gl-matrix-2/math/mat3.js +1 -1
- package/core/libs/gl-matrix-2/math/mat4.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/core/mathUtils.js +1 -1
- package/core/perspectiveUtils.js +1 -1
- package/form/elements/inputs/DatePickerInput.d.ts +4 -0
- package/form/elements/inputs/DatePickerInput.js +5 -0
- package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +4 -0
- package/form/elements/inputs/DateTimeOffsetPickerInput.js +5 -0
- package/form/elements/inputs/TimePickerInput.d.ts +4 -0
- package/form/elements/inputs/TimePickerInput.js +5 -0
- package/form/elements/support/inputs.js +1 -1
- package/geometry/projection/computeTranslationToOriginAndRotation.js +1 -1
- package/geometry/projection/projectDirection.js +1 -1
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/axisAngle.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/clipRay.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/offset.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/geometry/support/meshUtils/projection.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/ray.js +1 -1
- package/geometry/support/triangle.js +1 -1
- package/geometry/support/vector.js +1 -1
- package/interfaces.d.ts +405 -7
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/layers/voxel/voxelPlaneUtils.js +1 -1
- package/package.json +1 -1
- package/portal/support/resourceExtension.js +1 -1
- package/portal/support/resourceUtils.js +1 -1
- package/portal/support/utils.js +5 -0
- package/smartMapping/popup/support/utils.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMImageColorSubstitutionHelper.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/views/2d/ViewState.js +1 -1
- package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
- package/views/2d/engine/imagery/RasterVFTile.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayContainer.js +1 -1
- package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
- package/views/2d/engine/webgl/WGLTile.js +1 -1
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/RotateManipulation.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/2d/navigation/actions/Pan.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/images/Factory.js +5 -0
- package/views/3d/analysis/support/measurementUtils.js +1 -1
- package/views/3d/analysis/support/viewUtils.js +1 -1
- package/views/3d/animation/pointToPoint/Animation.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/altitude.js +1 -1
- package/views/3d/camera/constraintUtils/common.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/LocalAtmosphere.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/environment/StarsTechnique.js +1 -1
- package/views/3d/externalRenderers.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/lineGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/support/Segment.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.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/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelParameters.js +1 -1
- package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SProjectionUtil.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LoDUtil.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/I3STreeDebugger.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/edgeUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/PanPlanarMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/PanSphericalMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/RotationMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/state/utils/viewUtils.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/support/RenderCoordsHelper.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/cameraUtilsInternal.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/geometryUtils/ray.js +1 -1
- package/views/3d/support/intersectionUtils.js +1 -1
- package/views/3d/support/mathUtils.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayContent.js +5 -0
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TextureReference.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileOverlayData.js +1 -1
- package/views/3d/terrain/TileRenderInfo.js +1 -1
- package/views/3d/terrain/interfaces.js +1 -1
- package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +32 -53
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/CascadeCamera.js +1 -1
- package/views/3d/webgl-engine/lib/ContentObject.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/ITexture.js +5 -0
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
- package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/Path.js +1 -1
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineDrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/DrawManipulator.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/ManipulatorCollection.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/sketch/normalizedPoint.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
- package/views/interactive/support/viewUtils.js +1 -1
- package/views/interactive/tooltip/constraintUtils.js +1 -1
- package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/navigation/gamepadAndKeyboardUtils.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/views/support/layerViewUtils.js +1 -1
- package/webdoc/support/saveUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.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/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
- package/widgets/ElevationProfile/support/constants.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.d.ts +4 -0
- package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +4 -0
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/templateUtils.js +5 -0
- package/assets/esri/core/workers/chunks/19857e5420cdf23c5f2e.js +0 -1
- package/assets/esri/core/workers/chunks/26289742b9280f0b5247.js +0 -1
- package/assets/esri/core/workers/chunks/46f6b77e586d78aeb75c.js +0 -1
- package/assets/esri/core/workers/chunks/4e39252f40bc57be9d12.js +0 -1
- package/assets/esri/core/workers/chunks/54513578f735d274a20e.js +0 -1
- package/assets/esri/core/workers/chunks/8dab0acdbbd5c282645a.js +0 -1
- package/assets/esri/core/workers/chunks/8e4b01a0cb8c8926f2b6.js +0 -1
- package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +0 -1
- package/assets/esri/core/workers/chunks/b2d4a56197dcabdbae35.js +0 -1
- package/assets/esri/core/workers/chunks/be0565d923afba7ca300.js +0 -1
- package/assets/esri/core/workers/chunks/c99fa4189a114370b004.js +0 -1
- package/assets/esri/core/workers/chunks/daa79c14150c12d8bc3d.js +0 -1
- package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +0 -1
- package/assets/esri/core/workers/chunks/f67388c4b7103fda6633.js +0 -1
- package/views/3d/analysis/Slice/images/Factory.js +0 -5
- /package/assets/esri/views/3d/analysis/{Slice/images → images}/heading-rotate.ts.svg +0 -0
- /package/assets/esri/views/3d/analysis/{Slice/images → images}/tilt-rotate.ts.svg +0 -0
- /package/views/3d/analysis/{Slice/images → images}/generateTextures.js +0 -0
- /package/views/3d/analysis/{Slice/images → images}/heading-rotate-svg.js +0 -0
- /package/views/3d/analysis/{Slice/images → images}/tilt-rotate-svg.js +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{screenPointObjectToArray as e,castScreenPointArray as n,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{l as t,
|
|
5
|
+
import{screenPointObjectToArray as e,castScreenPointArray as n,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{l as t,c as o,b as l,f as s,j as c,i as u,g as i}from"../../../../chunks/vec3.js";import{c as a}from"../../../../chunks/vec3f64.js";import{projectPoint as p}from"../../../../geometry/projection.js";import{intersectRay as d,create as m,fromPositionAndNormal as f}from"../../../../geometry/support/plane.js";import{create as g}from"../../../../geometry/support/ray.js";import{projectPoint as E}from"../../../../geometry/support/vector.js";import{sv2d as y}from"../../../../geometry/support/vectorStacks.js";import{getZForElevationMode as S,getGraphicEffectiveElevationInfo as j}from"../../../../support/elevationInfoUtils.js";import{fromScreen as v}from"../../support/geometryUtils/ray.js";import{newIntersector as x}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as R,IntersectorType as b}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{TERRAIN_ID as I}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{EventPipeline as w}from"../../../interactive/dragEventPipeline.js";function H(e,n){return O(e,(()=>n))}function U(e){return O(e,(e=>e.plane))}function O(r,t){const o=a(),l=a();let s=!1;return c=>{const u=t(c);if("start"===c.action){const t=e(c.screenStart,n(y.get())),l=v(r.state.camera,t,B);null!=l&&(s=d(u,l,o))}if(!s)return null;const i=e(c.screenEnd,n(y.get())),a=v(r.state.camera,i,B);return null==a?null:d(u,a,l)?{...c,renderStart:o,renderEnd:l,plane:u,ray:a}:null}}function C(e,n,t=0,o=null,l=null){let s=null;return c=>{if("start"===c.action&&(s=e.sceneIntersectionHelper.intersectElevationFromScreen(r(c.screenStart.x,c.screenStart.y),n,t,l),null!=s&&null!=o&&!p(s,s,o)))return null;if(null==s)return null;const u=e.sceneIntersectionHelper.intersectElevationFromScreen(r(c.screenEnd.x,c.screenEnd.y),n,t,l);return null!=u&&(null==o||p(u,u,o))?{...c,mapStart:s,mapEnd:u}:null}}function T(e,n,r,t=null,o=null){return C(e,r,S(n,e,r),t,o)}function D(e,n,r,t=null,o=null){return T(e,r,j(n),t,o)}function M(e,n,r,t){const o=n.toMap(e.screenStart,{include:[r]});return null!=o?D(n,r,o,t):null}function N(e,n){const r=q,t=z,o=m();e.renderCoordsHelper.worldUpAtPosition(n,r);const c=l(o,r,s(t,n,e.state.camera.eye));return l(c,c,r),f(n,c,o)}function P(e,n,r){let t=null;const o=new w;return o.next(H(e,N(e,n))).next(h(e,n)).next(k(e,r)).next((e=>{e.mapEnd.x=e.mapStart.x,e.mapEnd.y=e.mapStart.y,t=e})),e=>(t=null,o.execute(e),t)}function h(e,n){const r=a(),l=t(n);e.renderCoordsHelper.worldUpAtPosition(n,r);const p=a(),d=a(),m=o=>{if(s(o,o,n),E(r,o,o),"global"===e.viewingMode){t(o)*Math.sign(c(r,o))<.001-l&&s(o,u(o,r,.001),n)}return i(o,o,n),o};return e=>(e.renderStart=m(o(p,e.renderStart)),e.renderEnd=m(o(d,e.renderEnd)),e)}function k(e,n){const r=e.renderCoordsHelper;return e=>{const t=r.fromRenderCoords(e.renderStart,n),o=r.fromRenderCoords(e.renderEnd,n);return null!=t&&null!=o?{...e,mapStart:t,mapEnd:o}:null}}var G;function A(e){let n=null;return r=>{switch(r.action){case"start":n=e.disableDisplay();break;case"end":case"cancel":null!=n&&(n.remove(),n=null)}return r}}function F(n,t=null){const o=x(n.state.viewingMode);o.options.selectionMode=!0,o.options.store=R.MIN,o.options.hud=!1;const l=r(),s={requiresGroundFeedback:!0,enableDraped:!0,exclude:new Set},c=a(),u=t??n.spatialReference,i=r=>{n.map.ground&&n.map.ground.opacity<1?s.exclude.add(I):s.exclude.delete(I),n.sceneIntersectionHelper.intersectIntersectorScreen(e(r,l),o,s);const t=o.results.min;let i;if(t.getIntersectionPoint(c))i=t.intersector===b.TERRAIN?G.GROUND:G.OTHER;else{if(!o.results.ground.getIntersectionPoint(c))return null;i=G.GROUND}return{location:n.renderCoordsHelper.fromRenderCoords(c,u),surfaceType:i}};let p;return e=>{if("start"===e.action){const n=i(e.screenStart);p=null!=n?n.location:null}if(null==p)return null;const n=i(e.screenEnd);return null!=n&&null!=n.location?{...e,mapStart:p,mapEnd:n.location,surfaceType:n.surfaceType}:null}}!function(e){e[e.GROUND=0]="GROUND",e[e.OTHER=1]="OTHER"}(G||(G={}));const q=a(),z=a(),B=g();export{G as SurfaceType,k as convertToMapCoordinates,A as hideManipulatorWhileDragging,h as projectToWorldUp,F as screenToMap3D,T as screenToMapXYAtLocation,M as screenToMapXYForGraphic,D as screenToMapXYForGraphicAtLocation,H as screenToRenderPlane,U as screenToRenderPlaneFromEvent,P as screenToZConstrained};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{removeHandles as e,handlesGroup as t,destroyHandle as n,refHandle as a}from"../../../../core/handleUtils.js";import{deg2rad as i}from"../../../../core/mathUtils.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{s as r,
|
|
5
|
+
import{removeHandles as e,handlesGroup as t,destroyHandle as n,refHandle as a}from"../../../../core/handleUtils.js";import{deg2rad as i}from"../../../../core/mathUtils.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{s as r,g as l,i as s}from"../../../../chunks/vec3.js";import{c}from"../../../../chunks/vec3f64.js";import{getGraphicEffectiveElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{Manipulator3D as h}from"../Manipulator3D.js";import{GrabbingState as m}from"./GrabbingState.js";import{ManipulatorState as d}from"./ManipulatorState.js";import{ManipulatorType as u}from"./ManipulatorType.js";import{getSettings as g}from"./settings.js";import{ExtendedLineVisualElement as f}from"../visualElements/ExtendedLineVisualElement.js";import{LaserlineVisualElement as y}from"../visualElements/LaserlineVisualElement.js";import{OutlineVisualElement as v}from"../visualElements/OutlineVisualElement.js";import{GraphicState as E}from"../../layers/graphics/GraphicState.js";import{RenderOccludedFlag as w}from"../../webgl-engine/lib/Material.js";function b(t){const{view:n,graphic:a}=t,i=new E({graphic:a}),o=j(t,i),r=[o,S(t,o.visualElement,i),n.maskOccludee(a),n.trackGraphicState(i)];return{visualElement:o.visualElement,remove:()=>e(r)}}function j(e,a){const{view:i,graphic:r}=e,l=new v({view:i,geometry:D(r)?r.geometry:null,elevationInfo:p(r),attached:!1,isDecoration:!0}),s=g(i.effectiveTheme).visualElements.lineGraphics;s.shadowStyle.apply(l);const c=()=>{l.attached=a.displaying};s.outline.apply(l);const h=t([o((()=>a.displaying),c),o((()=>a.isDraped),(e=>{l.isDraped=e})),a.on("changed",(()=>l.geometry=D(r)?r.geometry:null)),n(l)]);return c(),{visualElement:l,remove:()=>h.remove()}}function S(r,l,s){const{graphic:c,view:h}=r,u=[],v=p(c),E="on-the-ground"===v.mode||!v.offset&&"absolute-height"!==v.mode,b=new d,j=g(h.effectiveTheme).visualElements,S=new f({view:h,extensionType:j.zVerticalLine.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:w.OccludeAndTransparent,isDecoration:!0});j.pointGraphics.shadowStyle.apply(S);const G=i(j.heightPlaneAngleCutoff),L=new y({view:h,attached:!1,angleCutoff:G,isDecoration:!0});j.heightPlane.apply(L);let A=1,C=1;const O=()=>{if(b.update(r),!s.displaying||E&&(s.isDraped||!D(c)||!c.geometry.hasZ))return l.laserlineEnabled=!1,S.attached=!1,void(L.attached=!1);l.laserlineEnabled=!0;const e=b.grabbingState&m.XY?j.laserlineAlphaMultiplier:1;e!==A&&(A=e,j.lineGraphics.shadowStyle.apply(l,e),j.pointGraphics.shadowStyle.apply(S,e));const t=b.grabbingState&m.Z?j.laserlineAlphaMultiplier:1;t!==C&&(C=t,j.heightPlane.apply(L,t)),M(S,b),T(r,l,L,b)};j.zVerticalLine.apply(S),u.push(s.on("changed",O),o((()=>s.displaying),O),l.events.on("attachment-origin-changed",O),n(S),n(L));const V=[],k=()=>{e(V),V.length=0,r.forEachManipulator((e=>V.push(e.events.on("grab-changed",O)))),r.forEachManipulator((e=>V.push(e.events.on("select-changed",O)))),O()};return k(),u.push(r.onManipulatorsChanged(k),a((()=>t(V)))),t(u)}function M(e,t){const n=1===t.numSelected?t.firstSelected:t.numSelected>1&&null!=t.firstGrabbedXY?t.firstGrabbedXY:null;null!=n?(e.setStartEndFromWorldDownAtLocation(n.renderLocation),e.attached=!0):e.attached=!1}function T(e,t,n,a){if(a.numSelected>0){r(G,0,0,0);let t=0;e.forEachManipulator(((e,n)=>{n===u.TRANSLATE_XY&&e.selected&&e instanceof h&&(l(G,G,e.renderLocation),t++)})),t>0?(n.heightManifoldTarget=s(G,G,1/t),n.attached=!0):n.attached=!1}else{const a=t.attachmentOrigin;null!=a&&e.view.renderCoordsHelper.toRenderCoords(a,G)?(n.heightManifoldTarget=G,n.attached=!0):n.attached=!1}}function D(e){return null!=e.geometry&&("polygon"===e.geometry.type||"polyline"===e.geometry.type)}const G=c();export{b as createVisualElements};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../../Color.js";import a from"../../../../../core/Evented.js";import r from"../../../../../core/Handles.js";import{handlesGroup as e}from"../../../../../core/handleUtils.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{
|
|
5
|
+
import t from"../../../../../Color.js";import a from"../../../../../core/Evented.js";import r from"../../../../../core/Handles.js";import{handlesGroup as e}from"../../../../../core/handleUtils.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{d as o,j as s,m as n,c as l,E as p}from"../../../../../chunks/mat4.js";import{a as u}from"../../../../../chunks/mat4f64.js";import{s as h}from"../../../../../chunks/vec3.js";import{f as c}from"../../../../../chunks/vec3f64.js";import{sv3d as m,sm4d as f}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as d}from"../../../../../support/elevationInfoUtils.js";import{Manipulator3D as _}from"../../Manipulator3D.js";import{RenderObject as g}from"../../RenderObject.js";import{screenToMapXYAtLocation as M}from"../dragEventPipeline3D.js";import{ManipulatorType as w}from"../ManipulatorType.js";import{getSettings as j}from"../settings.js";import{DISC_RADIUS as v,DISC_TRANSLATE_ARROW_OFFSET as A,DISC_HEIGHT as y,DISC_TRANSLATE_ARROW_SIZE as I}from"./config.js";import{Manipulation as T}from"./Manipulation.js";import{createGraphicMoveDragPipeline as b}from"./moveUtils.js";import{CullFaceOptions as D}from"../../../webgl-engine/lib/basicInterfaces.js";import{createExtrudedTriangle as E,transformInPlace as S}from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as x}from"../../../webgl-engine/lib/Material.js";import{ColorMaterial as P}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as k,dragAtLocation as R,constrainToMapAxis as U,addScreenDelta as O}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as L}from"../../../../interactive/interfaces.js";class q extends T{constructor(t){super(),this._handles=new r,this._arrowManipulatorInfos=new Array,this._angle=0,this._scale=1,this._radius=v,this._updateAfterDrag=!1,this.events=new a,this._tool=t.tool,this._view=t.view,this._opaqueMaterial=this._createMaterial(),this._transparentMaterial=this._createMaterial(.5),null!=t.radius&&(this._radius=t.radius),this._createManipulators(),this.forEachManipulator((t=>this._tool.manipulators.add(t)))}set orthogonalAvailable(t){this._arrowManipulatorInfos.length>=3&&(this._arrowManipulatorInfos[1].manipulator.available=t,this._arrowManipulatorInfos[3].manipulator.available=t)}destroy(){this._handles=i(this._handles),this.forEachManipulator((t=>{this._tool.manipulators.remove(t),t.destroy()})),this._tool=null,this._view=null,this._arrowManipulatorInfos.length=0}forEachManipulator(t){for(const{manipulator:a}of this._arrowManipulatorInfos)t(a,w.TRANSLATE_XY)}createGraphicDragPipeline(t,a,r){const e=a.graphic,i=d(e),o=e.geometry.spatialReference;return b(a,r,(a=>this.createDragPipeline(((r,e,i,o,s)=>(({steps:e,cancel:i}=t(r,e,i,o,s)),a(r,e,i))),i,o,e)),this._view.state.viewingMode)}createDragPipeline(t,a,r,i){return e(this._arrowManipulatorInfos.map((({manipulator:e},o)=>k(e,((e,s,n,l,p)=>{const u=s.next((t=>({...t,manipulatorType:w.TRANSLATE_XY}))).next(R(this._view,e.elevationAlignedLocation)).next(M(this._view,e.elevationAlignedLocation,a,r,i)).next(U(e.location,this.angle+(o+1)*Math.PI*.5)).next(O());t(e,u,n,l,p)})))))}get angle(){return this._angle}set angle(t){this._angle=t,this.dragging?this._updateAfterDrag=!0:this._updateManipulatorTransform()}get displayScale(){return this._scale}set displayScale(t){this._scale=t,this._updateManipulatorTransform()}get radius(){return this._radius}set radius(t){this._radius!==t&&(this._radius=t,this._updateManipulators())}_updateManipulators(){for(let t=0;t<this._arrowManipulatorInfos.length;t++)this._updateArrowManipulator(this._arrowManipulatorInfos[t],t);this._updateManipulatorTransform()}_updateArrowManipulator({manipulator:t,transform:a},r){const e=this._radius/v,i=I*e,l=i*Math.sqrt(3)/2,p=E(this._opaqueMaterial,l,i/2,i/2,y);S(p,o(f.get(),h(m.get(),0,-l/3,0))),t.renderObjects=[new g(p,L.Focused),new g(p.instantiate({material:this._transparentMaterial}),L.Unfocused)],t.radius=l/3*2*1.2;const u=s(f.get(),r*Math.PI/2),c=o(f.get(),h(m.get(),0,A*e,0));n(a,u,c)}_createManipulators(){for(let t=0;t<4;t++){const a=this._createArrowManipulator(t);this._arrowManipulatorInfos.push(a)}this._updateManipulatorTransform()}_updateManipulatorTransform(){const t=this.angle,a=l(f.get(),t,c(0,0,1));if(null==a)return;const r=p(f.get(),h(m.get(),this.displayScale,this.displayScale,this.displayScale)),e=n(f.get(),r,a);for(const i of this._arrowManipulatorInfos){const t=n(f.get(),e,i.transform);i.manipulator.modelTransform=t}}_createArrowManipulator(t){const a=new _({view:this._view,autoScaleRenderObjects:!1,worldOriented:!0,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:c(0,0,1)}}),r={manipulator:a,transform:u()};return this._updateArrowManipulator(r,t),this._handles.add(a.events.on("drag",(t=>{this._updateAfterDrag&&"end"===t.action&&!this.dragging&&(this._updateManipulatorTransform(),this._updateAfterDrag=!1)}))),r}_createMaterial(a=1){const r=j(this._view.effectiveTheme),e=t.toUnitRGBA(r.colors.accent);return e[3]*=a,new P({color:e,transparent:1!==a,cullFace:D.Back,renderOccluded:x.Transparent,isDecoration:!0})}get test(){return{arrowManipulators:this._arrowManipulatorInfos.map((({manipulator:t})=>t))}}}export{q as MoveXYAxisManipulation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../../Color.js";import{E as e}from"../../../../../chunks/mat4.js";import{
|
|
5
|
+
import t from"../../../../../Color.js";import{E as e}from"../../../../../chunks/mat4.js";import{a as i}from"../../../../../chunks/mat4f64.js";import{s as a}from"../../../../../chunks/vec3.js";import{f as r}from"../../../../../chunks/vec3f64.js";import{sv3d as s,sm4d as o}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as n}from"../../../../../support/elevationInfoUtils.js";import{Manipulator3D as l}from"../../Manipulator3D.js";import{RenderObject as p}from"../../RenderObject.js";import{screenToMapXYAtLocation as c}from"../dragEventPipeline3D.js";import{ManipulatorType as u}from"../ManipulatorType.js";import{getSettings as m}from"../settings.js";import{DISC_RADIUS as h,GEOMETRY_SEGMENTS as d,DISC_HEIGHT as _,DISC_COLLISION_RADIUS as f}from"./config.js";import{Manipulation as g}from"./Manipulation.js";import{createGraphicMoveDragPipeline as M}from"./moveUtils.js";import{SnapToScene as j}from"../snapping/SnapToScene.js";import{CullFaceOptions as T}from"../../../webgl-engine/lib/basicInterfaces.js";import{createCylinderGeometry as v}from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as S}from"../../../webgl-engine/lib/Material.js";import{ColorMaterial as w}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as y,dragAtLocation as b,addScreenDelta as E}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as x}from"../../../../interactive/interfaces.js";class A extends g{constructor(t){super(),this._snapToScene=new j,this._scale=1,this._radius=h,this._view=t.view,this._tool=t.tool,this._discMaterial=this._createMaterial(),this._discMaterialTransparent=this._createMaterial(.5),null!=t.snapToScene&&(this.snapToScene=t.snapToScene),null!=t.radius&&(this._radius=t.radius),this._createManipulator(),this.forEachManipulator((t=>this._tool.manipulators.add(t)))}destroy(){this.forEachManipulator((t=>{this._tool.manipulators.remove(t),t.destroy()})),this._tool=null,this._view=null,this._manipulator=null}forEachManipulator(t){t(this._manipulator,u.TRANSLATE_XY)}get displayScale(){return this._scale}set displayScale(t){this._scale=t,this._updateManipulatorTransform()}get snapToScene(){return this._snapToScene.enabled}set snapToScene(t){this._snapToScene.enabled=t}get radius(){return this._radius}set radius(t){t!==this._radius&&(this._radius=t,this._updateManipulator())}createGraphicDragPipeline(t,e,i){const a=e.graphic,r=n(a),s=a.geometry.spatialReference;return M(e,i,(e=>this.createDragPipeline(((i,a,r,s,o)=>(({steps:a,cancel:r}=t(i,a,r,s,o)),e(i,a,r))),r,s,a)),this._view.state.viewingMode)}createDragPipeline(t,e,i,a){const r=this._view;return y(this._manipulator,((s,o,n,l,p)=>{const m=o.next(b(r,s.elevationAlignedLocation)).next(c(r,s.elevationAlignedLocation,e,i,a)).next(...this._snapToScene.createDragEventPipelineStep(r,e)).next((t=>({...t,manipulatorType:u.TRANSLATE_XY}))).next(E());t(s,m,n,l,p)}))}_updateManipulatorTransform(){const t=e(o.get(),a(s.get(),this.displayScale,this.displayScale,this.displayScale));this._manipulator.modelTransform=t}_createManipulator(){const t=this._view;this._manipulator=new l({view:t,worldSized:!1,autoScaleRenderObjects:!1,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:r(0,0,1)},worldOriented:!0}),this._updateManipulator()}_updateManipulator(){const t=v(this._discMaterial,_,1,d,r(0,0,1),r(0,0,0));t.transformation=e(i(),r(this._radius,this._radius,this._radius)),this._manipulator.renderObjects=[new p(t,x.Focused),new p(t.instantiate({material:this._discMaterialTransparent}),x.Unfocused)],this._manipulator.radius=f*(this._radius/h)}_createMaterial(e=1){const i=m(this._view.effectiveTheme),a=t.toUnitRGBA(i.colors.accent);return a[3]*=e,new w({color:a,transparent:1!==e,cullFace:T.Back,renderOccluded:S.Transparent,isDecoration:!0})}get test(){return{discManipulator:this._manipulator}}}export{A as MoveXYDiscManipulation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../../Color.js";import{darken as e}from"../../../../../core/colorUtils.js";import i from"../../../../../core/Evented.js";import{clamp as r}from"../../../../../core/mathUtils.js";import{w as a,r as o,
|
|
5
|
+
import t from"../../../../../Color.js";import{darken as e}from"../../../../../core/colorUtils.js";import i from"../../../../../core/Evented.js";import{clamp as r}from"../../../../../core/mathUtils.js";import{w as a,r as o,b as s}from"../../../../../chunks/mat4.js";import{a as n}from"../../../../../chunks/mat4f64.js";import{q as l,f as p,n as c,j as u,b as m,i as d}from"../../../../../chunks/vec3.js";import{c as h,f}from"../../../../../chunks/vec3f64.js";import{Manipulator3D as _}from"../../Manipulator3D.js";import{createManipulatorMaterial as j}from"../../manipulatorUtils.js";import{RenderObject as w}from"../../RenderObject.js";import{screenToZConstrained as M}from"../dragEventPipeline3D.js";import{ManipulatorType as v}from"../ManipulatorType.js";import{getSettings as g}from"../settings.js";import{DISC_RADIUS as b}from"./config.js";import{Manipulation as y}from"./Manipulation.js";import{createGraphicMoveDragPipeline as z}from"./moveUtils.js";import{createTubeGeometry as T,createConeGeometry as U}from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as O}from"../../../webgl-engine/lib/Material.js";import{createManipulatorDragEventPipeline as P,addScreenDelta as A}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as E}from"../../../../interactive/interfaces.js";class R extends y{constructor(t){super(),this._radius=b,this.events=new i,this._tool=t.tool,this._view=t.view,null!=t.radius&&(this._radius=t.radius),this._createManipulator(),this.forEachManipulator((t=>this._tool.manipulators.add(t)))}destroy(){this._manipulator.applyObjectTransform=k,this.forEachManipulator((t=>{this._tool.manipulators.remove(t),t.destroy()}))}forEachManipulator(t){t(this._manipulator,v.TRANSLATE_Z)}createGraphicDragPipeline(t,e,i){const r=e.graphic.geometry.spatialReference;return z(e,i,(e=>this.createDragPipeline(((i,r,a,o,s)=>(({steps:r,cancel:a}=t(i,r,a,o,s)),e(i,r,a))),r)),this._view.state.viewingMode)}createDragPipeline(t,e){const i=this._view;return P(this._manipulator,((r,a,o,s,n)=>{const l=a.next((t=>({...t,manipulatorType:v.TRANSLATE_Z}))).next(M(i,r.renderLocation,e)).next(A());t(r,l,o,s,n)}))}get radius(){return this._radius}set radius(t){t!==this._radius&&(this._radius=t,this._updateManipulator())}_updateManipulator(){const i=this._radius/b,r=g(this._view.effectiveTheme),l=r.zManipulator.height*i,p=r.zManipulator.coneHeight*i,c=r.zManipulator.coneWidth*i,u=r.zManipulator.width*i,m=[f(0,0,0),f(0,0,l)],d=[f(0,0,0),f(0,0,l+p)],h=t=>{const e=n();if(a(e,e,[0,0,l]),o(e,e,Math.PI/2),t){const i=1+2*t/c;s(e,e,[i,i,i])}return e},_=h(0),M=(i,a)=>{const o=e(r.zManipulator.color,a);return o.a*=i,t.toUnitRGBA(o)},v=j(M(1,.25),O.Occlude),y=j(M(1,0),O.Occlude),z=j(M(.7,0),r.zManipulator.renderOccluded),P=j(M(.85,0),r.zManipulator.renderOccluded),A=T(v,m,u/2,16,!1),R=U(v,p,c/2,16,!1);R.transformation=_,this._manipulator.renderObjects=[new w(R,E.Unfocused),new w(A,E.Unfocused),new w(R.instantiate({material:y}),E.Focused),new w(A.instantiate({material:y}),E.Focused),new w(R.instantiate({material:z}),E.Unfocused),new w(A.instantiate({material:z}),E.Unfocused),new w(R.instantiate({material:P}),E.Focused),new w(A.instantiate({material:P}),E.Focused)],this._manipulator.radius=u/2+2,this._manipulator.collisionType={type:"line",paths:[d]}}_createManipulator(){const t=this._view,e=g(t.effectiveTheme),i=new _({view:t,autoScaleRenderObjects:!1,worldSized:!1,selectable:!1,cursor:"ns-resize",elevationInfo:this.elevationInfo,worldOriented:!0,collisionPriority:1.6});i.applyObjectTransform=i=>{const a=t.state.camera,o=x;t.renderCoordsHelper.toRenderCoords(this._manipulator.elevationAlignedLocation,o);const s=l(a.eye,o),n=a.computeRenderPixelSizeAtDist(s),h=p(D,o,a.eye);c(h,h);const f=S;t.renderCoordsHelper.worldUpAtPosition(x,f);const _=Math.abs(u(h,f)),j=m(D,h,f),w=m(D,j,f),M=r(_,.01,1),v=1-Math.sqrt(1-M*M)/M/a.fullWidth,g=this._radius/b,y=e.zManipulator.width*g;d(w,c(w,w),(1/v-1)*s+n*y),i[12]-=D[0],i[13]-=D[1],i[14]-=D[2]},this._manipulator=i,this._updateManipulator()}get test(){return{manipulator:this._manipulator}}}const x=h(),D=h(),S=h(),k=()=>{};export{R as MoveZManipulation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../geometry.js";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{unitRGBAFromColor as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import n from"../../../../../core/Evented.js";import o from"../../../../../core/Handles.js";import{handlesGroup as r,makeHandle as s,destroyHandle as l}from"../../../../../core/handleUtils.js";import{destroyMaybe as p,removeMaybe as h}from"../../../../../core/maybe.js";import{zeroMeters as d,scale as u,createLength as c}from"../../../../../core/quantityUtils.js";import{watch as m,when as g,initial as _}from"../../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as f}from"../../../../../core/unitUtils.js";import{property as v}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as M}from"../../../../../core/accessorSupport/decorators/subclass.js";import{I as y}from"../../../../../chunks/mat4f64.js";import{l as x,g as O,f as b,s as E,e as G,b as S}from"../../../../../chunks/vec3.js";import{f as w,c as I}from"../../../../../chunks/vec3f64.js";import{UpdatingHandles as V}from"../../../../../core/support/UpdatingHandles.js";import H from"../../../../../geometry/Polyline.js";import{hasCompatibleTopology as T}from"../../../../../geometry/support/coordsUtils.js";import{projectPoint as A}from"../../../../../geometry/support/plane.js";import{sv3d as D}from"../../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as L}from"../../../../../layers/graphics/dehydratedPoint.js";import{getGraphicEffectiveElevationInfo as j}from"../../../../../support/elevationInfoUtils.js";import{isVolumetricSymbol as P}from"../../../../../symbols/support/utils.js";import{Manipulator3D as U}from"../../Manipulator3D.js";import{createManipulatorMaterial as N,createManipulatorOutlineMaterial as C,placeAtGraphic as k}from"../../manipulatorUtils.js";import{RenderObject as R}from"../../RenderObject.js";import{SegmentLabels3D as F}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as z}from"../../SnappingVisualizer3D.js";import{screenToRenderPlaneFromEvent as X,convertToMapCoordinates as Z,screenToMapXYAtLocation as Y,screenToMapXYForGraphicAtLocation as q}from"../dragEventPipeline3D.js";import{ManipulatorType as W}from"../ManipulatorType.js";import{canMoveZ as K}from"../manipulatorUtils.js";import{getSettings as B}from"../settings.js";import{createVisualElements as J}from"../visualElementUtils.js";import{DISC_RADIUS_SMALL as Q}from"../manipulations/config.js";import{ManipulationType as $,MoveManipulation as ee}from"../manipulations/MoveManipulation.js";import{shapeOrientation as te,axisConstrainedDragSign as ie}from"../manipulations/moveUtils.js";import{MoveXYGraphicManipulation as ae}from"../manipulations/MoveXYGraphicManipulation.js";import{createEdgeOffsetIntersectionPlane as ne,createEdgeOffsetOperation as oe,edgeOffsetRotationMatrix as re,screenEdgeLengthSquared as se}from"./edgeOffsetUtils.js";import{OutlineVisualElement as le}from"../../visualElements/OutlineVisualElement.js";import{GraphicState as pe}from"../../../layers/graphics/GraphicState.js";import{createExtrudedTriangle as he,createSphereGeometry as de}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as ue}from"../../../../input/IViewEvents.js";import{sceneSnappingAtLocation as ce,addMapDelta as me,createManipulatorDragEventPipeline as ge,dragAtLocation as _e,addScreenDelta as fe}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as ve,ManipulatorStateCustomFlags as Me}from"../../../../interactive/interfaces.js";import{EditGeometryOperations as ye}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as xe}from"../../../../interactive/editGeometry/interfaces.js";import{SnappingContext as Oe}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as be}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{ReshapeEdgeOffsetTooltipInfo as Ee}from"../../../../interactive/tooltip/ReshapeTooltipInfos.js";import{Tooltip as Ge}from"../../../../interactive/tooltip/Tooltip.js";import{TooltipValueInfoElevation as Se}from"../../../../interactive/tooltip/TooltipValueInfoElevation.js";import{TranslateGraphicZTooltipInfo as we,TranslateGraphicXYTooltipInfo as Ie,TranslateGraphicTooltipInfo as Ve,TranslateVertexZTooltipInfo as He,TranslateVertexXYTooltipInfo as Te,TranslateVertexTooltipInfo as Ae}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoAreaByElevationMode as De}from"../../../../support/automaticAreaMeasurementUtils.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as Le,autoLengthByElevationMode as je}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistanceBetweenPoints as Pe,elevationOfPoint as Ue}from"../../../../support/euclideanLengthMeasurementUtils.js";import{geodesicDistance as Ne}from"../../../../support/geodesicLengthMeasurementUtils.js";import Ce from"../../../../../geometry/SpatialReference.js";let ke=class extends(n.EventedMixin(t)){constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=qe.NONE,this._updatingHandles=new V,this._recreatingManipulators=!1,this.outputGeometry=null,this._vertexLaserLineVisualElement=null;const t=B(e.tool.view.effectiveTheme).manipulators,i=t.vertex;this._vertexManipulatorMaterial=N(a(i.color),i.renderOccluded),this._vertexManipulatorOutlineMaterial=C(a(i.outlineColor),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=C(a(i.hoverOutlineColor),i.renderOccluded);const n=t.edge;this._edgeManipulatorMaterial=N(a(n.color),n.renderOccluded),this._edgeManipulatorOutlineMaterial=C(a(n.outlineColor),n.renderOccluded);const r=t.edgeOffset;this._edgeOffsetManipulatorMaterial=N(a(r.color),r.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=N(a(r.hoverColor),r.renderOccluded,!1);const s=t.selected;this._selectedManipulatorMaterial=N(a(s.color),s.renderOccluded),this._selectedManipulatorOutlineMaterial=C(a(s.outlineColor),s.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=C(a(s.hoverOutlineColor),s.renderOccluded)}initialize(){const{graphic:e,view:t}=this,i=this._graphicState=new pe({graphic:e});this._tooltip=new Ge({view:t}),this.addHandles([m((()=>i.displaying),(e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e})),m((()=>({labels:this._segmentLabels,enabled:this._labelOptions.enabled,edgeOffsetEnabled:this.enableEdgeOffset})),(({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")}),_),g((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),_),this.view.trackGraphicState(i)])}destroy(){this._segmentLabels=p(this._segmentLabels),this._tooltip=p(this._tooltip),this._removeManipulators(),this._updatingHandles.destroy()}get inputGeometry(){return null!=this._editGeometryOperations?this._editGeometryOperations.data.geometry:null}set inputGeometry(e){this._recreateEditGeometryAndManipulators(e)}get updating(){return this._updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get graphic(){return this.tool.graphic}get enableZShape(){return this.tool.enableZShape}get enableZVertex(){return this.tool.enableZVertex}get enableMoveGraphic(){return this.tool.enableMoveGraphic}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _labelOptions(){return this.tool.labelOptions}get _tooltipOptions(){return this.tool.tooltipOptions}removeSelectedVertices(){const e=this._manipulatorInfos.filter((e=>e.manipulator.selected&&"vertex"===e.type));this._removeVertices(e)}onManipulatorSelectionChanged(){this.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=p(this._moveManipulation),this._graphicMoveManipulation=p(this._graphicMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._editGeometryOperations)return;const t=j(this.graphic);for(const i of this._editGeometryOperations.data.components){const a=e?.byComponentIndex.get(i.index);for(const e of i.vertices){const i=a?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of i.edges)this._createVertexOrEdgeManipulator(e,t)}this._createGraphicMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}get canRedo(){return null!=this._editGeometryOperations&&this._editGeometryOperations.canRedo}get canUndo(){return null!=this._editGeometryOperations&&this._editGeometryOperations.canUndo}redo(){if(null==this._editGeometryOperations)return null;const e=this._editGeometryOperations.redo();return null!=e&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}undo(){if(null==this._editGeometryOperations)return null;this.emit("undo");const e=this._editGeometryOperations.undo();return null!=e&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}_recreateManipulators(){this._recreatingManipulators||(this._recreatingManipulators=!0,this._removeManipulators(),this._tooltip.clear(),this._createManipulators(),this._recreatingManipulators=!1)}_recreateEditGeometryAndManipulators(e){const t={byComponentIndex:new Map};if(null!=e&&null!=this.inputGeometry&&T(e,this.inputGeometry))for(const a of this._manipulatorInfos)if("vertex"===a.type&&a.manipulator.selected){const{index:e,component:{index:i}}=a.handle,{byComponentIndex:n}=t,o=n.get(i)||new Set;o.add(e),n.set(i,o)}if(this._recreatingManipulators=!0,this._removeManipulators(),this._tooltip.clear(),this._editGeometryOperations=p(this._editGeometryOperations),this._segmentLabels=p(this._segmentLabels),null==e)return void(this._recreatingManipulators=!1);const i="mesh"===e.type?e.anchor:e;this._editGeometryOperations=ye.fromGeometry(i,this.view.state.viewingMode),this._createManipulators(t),this._segmentLabels=new F({context:{view:this.view,editGeometryOperations:this._editGeometryOperations,elevationInfo:j(this.graphic),labelOptions:this._labelOptions,graphic:this.graphic,graphicState:this._graphicState},visible:this._labelOptions.enabled}),this._recreatingManipulators=!1}_perGraphicManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const a=[],n=this._manipulatorInfos.some((e=>"vertex"===e.type&&e.manipulator.selected)),o=e===We.SELECTED_OR_ALL&&n;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.grabbing||o&&!r.manipulator.selected||a.push(r),i++);if(0===a.length)return t;this._moveVertices(a,t);if(a.length===i){if(this._updateEventState(qe.MOVING),this.destroyed)return t;this.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,mover:this.graphic})}else{if(this._updateEventState(qe.RESHAPING),this.destroyed)return t;this.emit("reshape",{type:"reshape",mover:this.graphic})}return t}_isMultiVertexSelection(){return this._manipulatorInfos.reduce(((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e),0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(qe.RESHAPING),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:a}=e;if(!t&&!i&&!a)return;const n=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&n.push(o);this._moveVertices(n,e,xe.ACCUMULATE_STEPS),this.emit("reshape",{type:"reshape",mover:this.graphic})}_updateEventState(e){if(e===this._reshapeEventState)return!1;switch(e){case qe.NONE:if(0!==this._numGrabbing||0!==this._numDragging)return!1;switch(this._reshapeEventState){case qe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic})}break;case qe.MOVING:switch(this._reshapeEventState){case qe.NONE:this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic}),this.destroyed||this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic})}break;case qe.RESHAPING:switch(this._reshapeEventState){case qe.NONE:this.emit("reshape",{type:"reshape-start",mover:this.graphic});break;case qe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic}),this.destroyed||this.emit("reshape",{type:"reshape-start",mover:this.graphic})}}if(this.destroyed)return!1;const t=this._reshapeEventState!==e;return this._reshapeEventState=e,t}_createGraphicMoveManipulation(){const{tool:e,view:t}=this,i=this._graphicState;if(this._graphicMoveManipulation=new ae({tool:e,view:t,graphicState:i}),this.enableMoveGraphic){let e=null;this._manipulatorHandles.add(this._graphicMoveManipulation.createDragPipeline(((t,i,a)=>{i.next((e=>this._trackNumDragging(e))).next((t=>("start"===t.action&&(e=this._editGeometryOperations.createUndoGroup()),t))).next((e=>this._perGraphicManipulatorDragAction(We.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip($.XY,e),e))).next((t=>{"end"===t.action&&(this._tooltip.clear(),e=h(e))})),a.next((()=>this._onDragCancel(!0,(()=>e=h(e)))))}))),this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1))))}else this._graphicMoveManipulation.forEachManipulator((e=>{e.grabbable=!1,e.cursor=null}));this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(e.events.on("immediate-click",(e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()})))))}_createMoveManipulation(e){const{graphic:t,tool:i,view:a}=this,n=this._graphicState;this._moveManipulation=new ee({tool:i,view:a,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&K(t),snapToScene:!1,radius:ee.radiusForSymbol(t.symbol)}),this._moveManipulation.forEachManipulator((e=>this.addHandles([e.events.on("immediate-click",(i=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some((e=>e.manipulator.selected))||this.emit("immediate-click",{...i,graphic:t}),i.stopPropagation()})),this._watchAndUpdateGrabState(e,!1)])));const o=e=>t=>{this.addHandles(t.events.on("focus-changed",(({action:t})=>{"focus"===t&&this._tooltipOptions.enabled?this._updateTranslateTooltip(e):this._tooltip.clear()})))};this._moveManipulation.xyManipulation.forEachManipulator(o($.XY)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o($.XY_AXIS)),this._moveManipulation.zManipulation.forEachManipulator(o($.Z)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const r=t.geometry.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline(((a,n,o,r,s)=>{const{snappingStep:l,cancelSnapping:p}=be({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new Oe({editGeometryOperations:this._editGeometryOperations,elevationInfo:e,pointer:s,excludeFeature:t,visualizer:new z}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next((e=>(this._onDragCancel(),e))).next(p),{steps:o=o.next((e=>this._trackNumDragging(e))).next((e=>{const t=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return e.manipulatorType===W.TRANSLATE_XY&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e})).next(ce(this.view,e,t)).next(...l).next(me()).next((e=>this._perGraphicManipulatorDragAction(We.SELECTED_OR_ALL,e))).next((e=>(this._updateTranslateTooltip(a,e),e))),cancel:r}}),e,r,t),m((()=>n.displaying),(()=>this._updateMoveManipulationPosition()),_),n.on("changed",(()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()})),m((()=>n.isDraped),(e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?this.addHandles(this.view.elevationProvider.on("elevation-change",(()=>this._updateMoveManipulationPosition())),t):this.removeHandles(t)}),_)])}_createVisualElements(){const{graphic:e,view:t}=this,i=J({view:t,graphic:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._graphicMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,W.TRANSLATE_XY)}},onManipulatorsChanged:e=>this.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof le?i.visualElement:null),null!=this._outlineVisualElement&&this._manipulatorHandles.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>{this._graphicState.isDraped||this._updateMoveManipulationPosition()}))),this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=j(this.graphic)){const i=B(this.view.effectiveTheme).manipulators.edgeOffset,a=i.size/2,n=a+i.collisionPadding,o=a/n,s=o*Math.sqrt(3)/2;null==this._edgeOffsetManipulatorGeometryInside&&(this._edgeOffsetManipulatorGeometryInside=he(this._edgeOffsetManipulatorMaterial,s,o/2,o/2,i.height,i.offset)),null==this._edgeOffsetManipulatorGeometryOutside&&(this._edgeOffsetManipulatorGeometryOutside=he(this._edgeOffsetManipulatorMaterial,-s,o/2,o/2,i.height,-i.offset));const l=[new R(this._edgeOffsetManipulatorGeometryInside.instantiate(),ve.Unfocused),new R(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused),new R(this._edgeOffsetManipulatorGeometryOutside.instantiate(),ve.Unfocused),new R(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused)],p=new U({view:this.view,renderObjects:l,elevationInfo:"on-the-ground"!==t.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:n,available:!(!this.graphic.visible||!this.graphic.layer?.visible),collisionType:{type:"disc",direction:w(0,0,1)},collisionPriority:1,metadata:{deleting:!1}}),h=new U({view:this.view,worldSized:!0,worldOriented:!1,available:!(!this.graphic.visible||!this.graphic.layer?.visible),collisionPriority:-10,cursor:this.enableMoveGraphic?"move":"default",metadata:{deleting:!1}}),d={manipulator:p,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:h,elevationInfo:t,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(d,i.minSquaredEdgeLength),this._updateEdgeOffsetManipulator(d);const u=[];for(const r of[d.handle.leftVertex,d.handle.rightVertex]){const e=this._getManipulatorInfoFromHandle(r);null!=e&&u.push(e.manipulator.events.on("location-update",(()=>this._updateEdgeOffsetManipulator(d))))}d.locationUpdateHandle=r(u),this._manipulatorHandles.add(d.locationUpdateHandle,p),this._manipulatorHandles.add([this._watchAndUpdateGrabState(p,!0),this._watchAndUpdateGrabState(h,!0)],p),this._manipulatorHandles.add(ge(p,this._createEdgeOffsetPipeline(d,t)),p),this._manipulatorHandles.add(ge(h,((e,i,a,n)=>{if("touch"===n){this._createEdgeOffsetPipeline(d,t)(e,i,a)}else if(this.enableMoveGraphic){const n=this.graphic,o=null!=n.geometry?n.geometry.spatialReference:null;i.next((e=>this._trackNumDragging(e))).next(_e(this.view,e.elevationAlignedLocation)).next(Y(this.view,e.elevationAlignedLocation,t,o,n)).next(fe()).next(me()).next((e=>this._perGraphicManipulatorDragAction(We.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip($.XY,e),e))).next((e=>{"end"===e.action&&this._tooltip.clear()})),a.next((()=>this._onDragCancel(!e.metadata.deleting)))}})),p);const c=e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()};return this._manipulatorHandles.add([p.events.on("immediate-click",c),h.events.on("immediate-click",c),p.events.on("focus-changed",(({action:e})=>{const t=this._tooltipOptions;if("focus"===e&&t.enabled){const e=this._tooltip.info=new Ee({tooltipOptions:t});this._updateTooltipAreaOrTotalLength(e)}else this._tooltip.clear()}))],p),this._manipulatorInfos.push(d),this.manipulators.add(p),this.manipulators.add(h),this.emit("manipulators-changed"),d}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,a=e.edgeManipulator,n=()=>{e.visibilityHandle=h(e.visibilityHandle);const n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=n&&null!=o&&se(n.manipulator.renderLocation,o.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!a.focused||l)&&(i.grabbable=!l,a.grabbable=!l,e.visibilityHandle=r([i.disableDisplay(),s((()=>{i.grabbable=!0,a.grabbable=this.enableMoveGraphic}))]))};this._manipulatorHandles.add([i.events.on("focus-changed",n),a.events.on("focus-changed",n),s((()=>{h(e.visibilityHandle),a.metadata.deleting=!0,this.manipulators.remove(a)}))],i),n()}_updateEdgeOffsetManipulator(e){this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._editGeometryOperations.data,i=ne(this.view,e.manipulator.elevationAlignedLocation,oe(t,e.handle,e.manipulator.elevationInfo)),a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==a||null==n)return;const o=a.manipulator.renderLocation,r=n.manipulator.renderLocation,s=null!=i?re(i,o,r):y;e.manipulator.modelTransform=s,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=s;const l=x(O(Xe,o,r))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgeOffsetPipeline(e,t){return(i,a,n)=>{this._clearSelection();const{step:o,cleanup:r}=this._initializeEdgeOffset(e,t);a.next((e=>this._trackNumDragging(e))).next(_e(this.view,i.elevationAlignedLocation)).next(o).next(X(this.view)).next(Z(this.view,this._editGeometryOperations.data.spatialReference)).next(me()).next(this._applyComputeEdgeOffsetDistanceStep()).next(this._applyEdgeOffsetStep(e)).next(this._showEdgeOffsetTooltip()).next((e=>{"end"===e.action&&r()})),n.next((()=>{i.metadata.deleting||(r(),this._onDragCancel())}))}}_initializeEdgeOffset(e,t){const{view:i}=this,n=this._editGeometryOperations,o=oe(n.data.coordinateHelper,e.handle,t),s=n.createUndoGroup(),p=ne(i,e.manipulator.elevationAlignedLocation,o);if(o.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftEdge);null!=t&&this._splitEdgeManipulator(t,1)}if(o.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);null!=t&&this._splitEdgeManipulator(t,0)}const d=()=>new H({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:n.data.spatialReference}),u=B(i.effectiveTheme),c=new le({view:i,isDraped:this._graphicState.isDraped,geometry:d(),elevationInfo:e.elevationInfo,width:u.visualElements.lineGraphics.outline.width,color:a(u.colors.accent),attached:!0,isDecoration:!0});let g;const _=()=>{this._cleanEdgeOffsetCollapsedEdges(e),g=h(g)},f=this.on("undo",_);return g=r([l(c),m((()=>this._graphicState.isDraped),(e=>c.isDraped=e)),this._graphicState.on("changed",(()=>c.geometry=d())),s,f]),{step:e=>null==o||null==p?(_(),null):{...e,operation:o,plane:p},cleanup:_}}_applyEdgeOffsetStep(e){return t=>{if(this.destroyed||null==t.operation)return t;this._updateEventState(qe.RESHAPING);const{mapDeltaX:i,mapDeltaY:a,mapDeltaZ:n}=t;return(i||a||n)&&(this._offsetEdge(e,t),this.emit("reshape",{type:"reshape",mover:this.graphic})),t}}_applyComputeEdgeOffsetDistanceStep(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:("start"===e.action&&t.selectArrowFromStartPoint(i),{...e,signedDistance:t.signedDistanceToPoint(i)})}}_showEdgeOffsetTooltip(){return e=>{const{mapEnd:t,signedDistance:i,operation:a}=e,n=this._tooltip,o=this._tooltipOptions;if(!o.enabled||null==i)return n.clear(),e;let r=n.info;null!=r&&"reshape-edge-offset"===r.type||(r=n.info=new Ee({tooltipOptions:o}));const{coordinateHelper:s}=this._editGeometryOperations.data;return r.distance="end"===e.action?d:Fe(this._graphicState.isDraped,i*a.selectedArrow,t,a.plane,s),this._updateTooltipAreaOrTotalLength(r),e}}_cleanEdgeOffsetCollapsedEdges(e){const t=e.handle.leftVertex.leftEdge?.leftVertex,i=e.handle.leftVertex,a=e.handle.rightVertex.rightEdge?.rightVertex,n=e.handle.rightVertex,o=this._editGeometryOperations.data.coordinateHelper,r=[];if(t&&o.distance(t.pos,i.pos)<Ze){const e=this._getManipulatorInfoFromHandle(i);null!=e&&r.push(e)}if(o.distance(i.pos,n.pos)<Ze||a&&o.distance(a.pos,n.pos)<Ze){const e=this._getManipulatorInfoFromHandle(n);null!=e&&r.push(e)}r.length&&this._removeVertices(r)}_computeVertexManipulatorSizeAndOutline(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}_createVertexOrEdgeManipulator(e,t=j(this.graphic),i=!1){const{view:a}=this,n=B(a.effectiveTheme);if("edge"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(n.manipulators.vertex);this._vertexManipulatorGeometry=de(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=de(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(n.manipulators.edge);this._edgeManipulatorGeometry=de(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=de(this._edgeManipulatorOutlineMaterial,t,16,16)}const{geometry:o}=this.graphic,s=o?.type,l="point"===s||"mesh"===s?[]:[new R(this._vertexManipulatorGeometry.instantiate(),Ye.Vertex|ve.Unselected),new R(this._vertexManipulatorOutlineGeometry.instantiate(),Ye.Vertex|ve.Unfocused|ve.Unselected),new R(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Ye.Vertex|ve.Focused|ve.Unselected),new R(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),ve.Selected),new R(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),ve.Selected|ve.Unfocused),new R(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),ve.Selected|ve.Focused)];this.enableMidpoints&&l.push(new R(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),Ye.Edge|ve.Focused|ve.Unselected),new R(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Ye.Edge|ve.Focused|ve.Unselected),new R(this._edgeManipulatorGeometry.instantiate(),Ye.Edge|ve.Unfocused|ve.Unselected),new R(this._edgeManipulatorOutlineGeometry.instantiate(),Ye.Edge|ve.Unfocused|ve.Unselected));const p=new U({view:a,renderObjects:l,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:!(!this.graphic.visible||!this.graphic.layer?.visible),metadata:{deleting:!1}});p.selected=i,this._setTypeSpecificManipulatorSettings(p,e,t);const d="edge"===e.type?{manipulator:p,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:p,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(d),this.manipulators.add(p),this._updateManipulatorPosition(d),"edge"===d.type){const e=[];for(const t of[d.handle.leftVertex,d.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",(()=>this._updateManipulatorPosition(d))))}d.locationUpdateHandle=r(e),this._manipulatorHandles.add(d.locationUpdateHandle,p)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(p,!0),p);const u=ge(p,((e,i,a,n)=>{let o=null;const{snappingStep:r,cancelSnapping:s}=be({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new Oe({editGeometryOperations:this._editGeometryOperations,elevationInfo:t,pointer:n,excludeFeature:this.graphic,visualizer:new z}),updatingHandles:this._updatingHandles,useZ:!1});a=a.next((t=>(this._onDragCancel(!e.metadata.deleting,(()=>o=h(o))),t))).next(s),i.next((e=>this._trackNumDragging(e))).next((e=>{if("start"===e.action&&(o=this._editGeometryOperations.createUndoGroup()),"edge"===d.type){const t=this._splitEdgeManipulator(d);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:d,snapOrigin:d.handle.pos}})).next(_e(this.view,e.elevationAlignedLocation)).next(q(this.view,this.graphic,e.elevationAlignedLocation,e.location.spatialReference,this.graphic)).next(ce(this.view,t,this.graphic)).next(...r).next(me()).next((t=>{this._perVertexManipulatorDragAction(t),"end"===t.action&&(o=h(o)),this._updateTranslateVertexTooltip(e,$.XY,t)}))}));return this._manipulatorHandles.add([u,p.events.on("immediate-click",(e=>this._manipulatorClickCallback(e,d))),p.events.on("select-changed",(()=>{d.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition()})),p.events.on("focus-changed",(({action:e})=>{"focus"===e&&"edge"!==d.type?this._updateTranslateVertexTooltip(p,$.XY):this._tooltip.clear()}))],p),this.emit("manipulators-changed"),d}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&(this.undo(),this.outputGeometry=null!=this._editGeometryOperations?this._editGeometryOperations.data.geometry:null),null!=this.tool.snappingManager&&this.tool.snappingManager.doneSnapping(),this._tooltip.clear(),this._reshapeEventState){case qe.NONE:break;case qe.MOVING:this.emit("move",{type:"move",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape",mover:this.graphic})}t&&t(),this.destroyed||this._updateEventState(qe.NONE)}_setTypeSpecificManipulatorSettings(e,t,i){const{graphic:a,view:n}=this,o=B(n.effectiveTheme);switch(t.type){case"vertex":{e.state=Ye.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2;const{size:t,collisionPadding:n}=o.manipulators.vertex;e.radius=t/2+n,e.elevationInfo=i;const{geometry:r}=a,s=r?.type;e.interactive=null!=s&&"point"!==s&&"mesh"!==s;break}case"edge":{e.state=Ye.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:n}=o.manipulators.edge;e.radius=t/2+n,e.elevationInfo="on-the-ground"!==i.mode||P(a.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",(i=>this._onGrabStateChanged(e,t,i.action,i.pointerType)))}_onGrabStateChanged(e,t,i,a="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(qe.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==a||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach((e=>{const{manipulator:t}=e,{geometry:i}=this.graphic,a=i?.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=a&&"point"!==a&&"mesh"!==a,"edgeManipulator"in e&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)})),this._graphicMoveManipulation.forEachManipulator((e=>{e.interactive=e.grabbing||!this._numGrabbing})))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1)}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.emit("manipulators-changed"))}_getManipulatorInfoFromHandle(e){if(e)for(const t of this._manipulatorInfos)if(e===t.handle)return t;return null}_updateManipulatorPosition(e){if(null==e)return;const t=this._editGeometryOperations;if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,ze),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==a)return;const n=i.manipulator,o=a.manipulator;if(null!=e.manipulator.elevationInfo&&"on-the-ground"===e.manipulator.elevationInfo.mode){const i=n.location,a=o.location,r=.5,s=i.x+r*(a.x-i.x),l=i.y+r*(a.y-i.y),p=i.hasZ&&a.hasZ?0:void 0;e.manipulator.location=L(s,l,p,t.data.spatialReference)}else b(Xe,n.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=Xe}}_splitEdgeManipulator(e,t=.5){const i=this._editGeometryOperations,a=i.splitEdge(e.handle,t).createdVertex;e.locationUpdateHandle=h(e.locationUpdateHandle);const n=j(this.graphic);let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(a)):(o=e,o.handle=a,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,n)),a.leftEdge&&this._createVertexOrEdgeManipulator(a.leftEdge),a.rightEdge&&this._createVertexOrEdgeManipulator(a.rightEdge),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(o),this.enableEdgeOffset||this._updateTranslateVertexTooltip(o.manipulator,$.XY),this._updateSelection(e.manipulator);const r=this._updateEventState(qe.RESHAPING),s=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.components.indexOf(a.component);return this.emit("vertex-add",{type:"vertex-add",vertices:[{coordinates:s,componentIndex:l,vertexIndex:a.index}],added:s}),r&&this._updateEventState(qe.NONE),o}_updateMoveManipulationPosition(){const e=E(Xe,0,0,0);let t=0,i=!1,a=null,n=null;for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected?(t++,G(e,e,o.manipulator.renderLocation),null==a||o.selectedIndex>a.selectedIndex?(n=a,a=o):(null==n||o.selectedIndex>n.selectedIndex)&&(n=o)):i=!0);if(0===t){const e=this._graphicState.displaying&&this.enableMoveGraphic;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&K(this.graphic),this._moveManipulation.angle=te(this.graphic.geometry),this._moveManipulation.radius=ee.radiusForSymbol(this.graphic.symbol)}else{const e=this._graphicState.displaying;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&K(this.graphic),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=a){const e=a.handle.pos,t=null!=n?n.handle.pos:a.handle.leftEdge&&a.handle.leftEdge.leftVertex?a.handle.leftEdge.leftVertex.pos:null,o=null==n&&a.handle.rightEdge&&a.handle.rightEdge.rightVertex?a.handle.rightEdge.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=Re(t,e):o&&(i=Re(e,o))}this._moveManipulation.angle=i,this._moveManipulation.radius=Q}0!==t&&i?(S(e,e,1/t),ze.spatialReference=this._editGeometryOperations.data.spatialReference,ze.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,ze),this._moveManipulation.elevationAlignedLocation=ze):null==this._outlineVisualElement||this._graphicState.isDraped||null==this._outlineVisualElement.attachmentOrigin?k(this.view,this._moveManipulation,this.graphic):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._editGeometryOperations;for(const a of e)if("vertex"===a.type&&i.canRemoveVertex()){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightEdge));const e=i.removeVertices([a.handle]),n=e.removedVertices?.[0].createdEdge;n&&this._createVertexOrEdgeManipulator(n)}if(t.length>0){const e=t.map((e=>{const t=i.data.components.indexOf(e.component);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}));this.outputGeometry=i.data.geometry;const a=this._updateEventState(qe.RESHAPING);if(this.destroyed)return;if(this.emit("vertex-remove",{type:"vertex-remove",removed:e.map((e=>e.coordinates)),vertices:e}),this.destroyed)return;if(a&&(this._updateEventState(qe.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}_moveVertices(e,t,i=("start"===t.action?xe.NEW_STEP:xe.ACCUMULATE_STEPS)){const a=this._editGeometryOperations;a.moveVertices(e.map((e=>e.handle)),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i),this.outputGeometry=a.data.geometry;for(const n of e)this._updateManipulatorPosition(n)}_offsetEdge(e,t){if(null==t.operation||null==t.signedDistance)return;const i=this._editGeometryOperations,a=t.operation.clone();a.distance=t.signedDistance,i.updateVertices([e.handle.leftVertex,e.handle.rightVertex],a),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,e.button===ue.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===ue.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){const i=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));1===i.length?this._updateTranslateVertexTooltip(i[0].manipulator,e,t):this._updateTranslateGraphicTooltip(e,t)}_updateTranslateGraphicTooltip(e,t){const i=this._tooltipOptions;if(!i.enabled)return;const a=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(e){case $.XY:this._tooltip.info=new Ve({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,t)=>Le(e,t,a)));break;case $.XY_AXIS:this._tooltip.info=new Ie({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,i)=>{const n=Le(e,i,a);return u(n,ie(t))}));break;case $.Z:this._tooltip.info=new we({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,Pe)}}_updateTranslateVertexTooltip(e,t,i){const a=this._tooltipOptions;if(!a.enabled)return;let n;const o=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(t){case $.XY:n=new Ae({tooltipOptions:a}),this._updateTranslateTooltipDistance(n,i,((e,t)=>Le(e,t,o))),this._updateTooltipAreaOrTotalLength(n);break;case $.XY_AXIS:n=new Te({tooltipOptions:a}),this._updateTranslateTooltipDistance(n,i,((e,t)=>{const a=Le(e,t,o);return u(a,ie(i))})),this._updateTooltipAreaOrTotalLength(n);break;case $.Z:n=new He({tooltipOptions:a}),this._updateTranslateTooltipDistance(n,i,Pe)}const r=Ue(e.elevationAlignedLocation);null!=r&&(n.elevation=new Se({actual:r,mode:"absolute-height"})),this._tooltip.info=n}_updateTranslateTooltipDistance(e,t,i){if(null!=t&&"end"!==t.action){const{mapStart:a,mapEnd:n}=t,o=i(a,n);e.distance=null!=o?o:d}}_updateTooltipAreaOrTotalLength(e){const{geometry:t}=this.graphic;if(null==t)return;const i=this._graphicState.isDraped?"on-the-ground":"absolute-height";e.area="polygon"===t.type?De(t,i):null,e.totalLength="polyline"===t.type?je(t,i):null}get test(){return{segmentLabels:this._segmentLabels,tooltip:this._tooltip}}};function Re(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function Fe(e,t,i,a,n){if(e){const e=n.toXYZ(n.pointToVector(i)),o=A(a,e,D.get()),r=Ne(o,e,n.spatialReference);if(null!=r)return c(r.value*Math.sign(t),r.unit)}return c(t*f(i.spatialReference),"meters")}e([v()],ke.prototype,"_editGeometryOperations",void 0),e([v()],ke.prototype,"_segmentLabels",void 0),e([v({constructOnly:!0})],ke.prototype,"tool",void 0),e([v()],ke.prototype,"_tooltip",void 0),e([v()],ke.prototype,"inputGeometry",null),e([v()],ke.prototype,"outputGeometry",void 0),e([v({readOnly:!0})],ke.prototype,"updating",null),e([v()],ke.prototype,"manipulators",null),e([v()],ke.prototype,"view",null),e([v()],ke.prototype,"graphic",null),e([v()],ke.prototype,"enableZShape",null),e([v()],ke.prototype,"enableZVertex",null),e([v()],ke.prototype,"enableMoveGraphic",null),e([v()],ke.prototype,"enableMidpoints",null),e([v()],ke.prototype,"enableEdgeOffset",null),e([v()],ke.prototype,"_labelOptions",null),e([v()],ke.prototype,"_tooltipOptions",null),ke=e([M("esri.views.3d.interactive.editingTools.reshapeGraphic.ReshapeOperation")],ke);const ze=L(0,0,void 0,Ce.WGS84),Xe=I(),Ze=1e-6;var Ye,qe,We;!function(e){e.Vertex=Me.Custom1,e.Edge=Me.Custom2}(Ye||(Ye={})),function(e){e[e.NONE=0]="NONE",e[e.MOVING=1]="MOVING",e[e.RESHAPING=2]="RESHAPING"}(qe||(qe={})),function(e){e[e.ALL=0]="ALL",e[e.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"}(We||(We={}));export{ke as ReshapeOperation};
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../geometry.js";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{unitRGBAFromColor as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import n from"../../../../../core/Evented.js";import o from"../../../../../core/Handles.js";import{handlesGroup as r,makeHandle as s,destroyHandle as l}from"../../../../../core/handleUtils.js";import{destroyMaybe as p,removeMaybe as h}from"../../../../../core/maybe.js";import{zeroMeters as d,scale as u,createLength as c}from"../../../../../core/quantityUtils.js";import{watch as m,when as g,initial as _}from"../../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as f}from"../../../../../core/unitUtils.js";import{property as v}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as M}from"../../../../../core/accessorSupport/decorators/subclass.js";import{I as y}from"../../../../../chunks/mat4f64.js";import{l as x,f as O,p as b,s as E,g as G,i as S}from"../../../../../chunks/vec3.js";import{f as w,c as I}from"../../../../../chunks/vec3f64.js";import{UpdatingHandles as V}from"../../../../../core/support/UpdatingHandles.js";import H from"../../../../../geometry/Polyline.js";import{hasCompatibleTopology as T}from"../../../../../geometry/support/coordsUtils.js";import{projectPoint as A}from"../../../../../geometry/support/plane.js";import{sv3d as D}from"../../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as L}from"../../../../../layers/graphics/dehydratedPoint.js";import{getGraphicEffectiveElevationInfo as j}from"../../../../../support/elevationInfoUtils.js";import{isVolumetricSymbol as P}from"../../../../../symbols/support/utils.js";import{Manipulator3D as U}from"../../Manipulator3D.js";import{createManipulatorMaterial as N,createManipulatorOutlineMaterial as C,placeAtGraphic as k}from"../../manipulatorUtils.js";import{RenderObject as R}from"../../RenderObject.js";import{SegmentLabels3D as F}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as z}from"../../SnappingVisualizer3D.js";import{screenToRenderPlaneFromEvent as X,convertToMapCoordinates as Z,screenToMapXYAtLocation as Y,screenToMapXYForGraphicAtLocation as q}from"../dragEventPipeline3D.js";import{ManipulatorType as W}from"../ManipulatorType.js";import{canMoveZ as K}from"../manipulatorUtils.js";import{getSettings as B}from"../settings.js";import{createVisualElements as J}from"../visualElementUtils.js";import{DISC_RADIUS_SMALL as Q}from"../manipulations/config.js";import{ManipulationType as $,MoveManipulation as ee}from"../manipulations/MoveManipulation.js";import{shapeOrientation as te,axisConstrainedDragSign as ie}from"../manipulations/moveUtils.js";import{MoveXYGraphicManipulation as ae}from"../manipulations/MoveXYGraphicManipulation.js";import{createEdgeOffsetIntersectionPlane as ne,createEdgeOffsetOperation as oe,edgeOffsetRotationMatrix as re,screenEdgeLengthSquared as se}from"./edgeOffsetUtils.js";import{OutlineVisualElement as le}from"../../visualElements/OutlineVisualElement.js";import{GraphicState as pe}from"../../../layers/graphics/GraphicState.js";import{createExtrudedTriangle as he,createSphereGeometry as de}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as ue}from"../../../../input/IViewEvents.js";import{sceneSnappingAtLocation as ce,addMapDelta as me,createManipulatorDragEventPipeline as ge,dragAtLocation as _e,addScreenDelta as fe}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as ve,ManipulatorStateCustomFlags as Me}from"../../../../interactive/interfaces.js";import{EditGeometryOperations as ye}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as xe}from"../../../../interactive/editGeometry/interfaces.js";import{SnappingContext as Oe}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as be}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{ReshapeEdgeOffsetTooltipInfo as Ee}from"../../../../interactive/tooltip/ReshapeTooltipInfos.js";import{Tooltip as Ge}from"../../../../interactive/tooltip/Tooltip.js";import{TooltipValueInfoElevation as Se}from"../../../../interactive/tooltip/TooltipValueInfoElevation.js";import{TranslateGraphicZTooltipInfo as we,TranslateGraphicXYTooltipInfo as Ie,TranslateGraphicTooltipInfo as Ve,TranslateVertexZTooltipInfo as He,TranslateVertexXYTooltipInfo as Te,TranslateVertexTooltipInfo as Ae}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoAreaByElevationMode as De}from"../../../../support/automaticAreaMeasurementUtils.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as Le,autoLengthByElevationMode as je}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistanceBetweenPoints as Pe,elevationOfPoint as Ue}from"../../../../support/euclideanLengthMeasurementUtils.js";import{geodesicDistance as Ne}from"../../../../support/geodesicLengthMeasurementUtils.js";import Ce from"../../../../../geometry/SpatialReference.js";let ke=class extends(n.EventedMixin(t)){constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=qe.NONE,this._updatingHandles=new V,this._recreatingManipulators=!1,this.outputGeometry=null,this._vertexLaserLineVisualElement=null;const t=B(e.tool.view.effectiveTheme).manipulators,i=t.vertex;this._vertexManipulatorMaterial=N(a(i.color),i.renderOccluded),this._vertexManipulatorOutlineMaterial=C(a(i.outlineColor),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=C(a(i.hoverOutlineColor),i.renderOccluded);const n=t.edge;this._edgeManipulatorMaterial=N(a(n.color),n.renderOccluded),this._edgeManipulatorOutlineMaterial=C(a(n.outlineColor),n.renderOccluded);const r=t.edgeOffset;this._edgeOffsetManipulatorMaterial=N(a(r.color),r.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=N(a(r.hoverColor),r.renderOccluded,!1);const s=t.selected;this._selectedManipulatorMaterial=N(a(s.color),s.renderOccluded),this._selectedManipulatorOutlineMaterial=C(a(s.outlineColor),s.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=C(a(s.hoverOutlineColor),s.renderOccluded)}initialize(){const{graphic:e,view:t}=this,i=this._graphicState=new pe({graphic:e});this._tooltip=new Ge({view:t}),this.addHandles([m((()=>i.displaying),(e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e})),m((()=>({labels:this._segmentLabels,enabled:this._labelOptions.enabled,edgeOffsetEnabled:this.enableEdgeOffset})),(({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")}),_),g((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),_),this.view.trackGraphicState(i)])}destroy(){this._segmentLabels=p(this._segmentLabels),this._tooltip=p(this._tooltip),this._removeManipulators(),this._updatingHandles.destroy()}get inputGeometry(){return null!=this._editGeometryOperations?this._editGeometryOperations.data.geometry:null}set inputGeometry(e){this._recreateEditGeometryAndManipulators(e)}get updating(){return this._updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get graphic(){return this.tool.graphic}get enableZShape(){return this.tool.enableZShape}get enableZVertex(){return this.tool.enableZVertex}get enableMoveGraphic(){return this.tool.enableMoveGraphic}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _labelOptions(){return this.tool.labelOptions}get _tooltipOptions(){return this.tool.tooltipOptions}removeSelectedVertices(){const e=this._manipulatorInfos.filter((e=>e.manipulator.selected&&"vertex"===e.type));this._removeVertices(e)}onManipulatorSelectionChanged(){this.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=p(this._moveManipulation),this._graphicMoveManipulation=p(this._graphicMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._editGeometryOperations)return;const t=j(this.graphic);for(const i of this._editGeometryOperations.data.components){const a=e?.byComponentIndex.get(i.index);for(const e of i.vertices){const i=a?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of i.edges)this._createVertexOrEdgeManipulator(e,t)}this._createGraphicMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}get canRedo(){return null!=this._editGeometryOperations&&this._editGeometryOperations.canRedo}get canUndo(){return null!=this._editGeometryOperations&&this._editGeometryOperations.canUndo}redo(){if(null==this._editGeometryOperations)return null;const e=this._editGeometryOperations.redo();return null!=e&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}undo(){if(null==this._editGeometryOperations)return null;this.emit("undo");const e=this._editGeometryOperations.undo();return null!=e&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}_recreateManipulators(){this._recreatingManipulators||(this._recreatingManipulators=!0,this._removeManipulators(),this._tooltip.clear(),this._createManipulators(),this._recreatingManipulators=!1)}_recreateEditGeometryAndManipulators(e){const t={byComponentIndex:new Map};if(null!=e&&null!=this.inputGeometry&&T(e,this.inputGeometry))for(const a of this._manipulatorInfos)if("vertex"===a.type&&a.manipulator.selected){const{index:e,component:{index:i}}=a.handle,{byComponentIndex:n}=t,o=n.get(i)||new Set;o.add(e),n.set(i,o)}if(this._recreatingManipulators=!0,this._removeManipulators(),this._tooltip.clear(),this._editGeometryOperations=p(this._editGeometryOperations),this._segmentLabels=p(this._segmentLabels),null==e)return void(this._recreatingManipulators=!1);const i="mesh"===e.type?e.anchor:e;this._editGeometryOperations=ye.fromGeometry(i,this.view.state.viewingMode),this._createManipulators(t),this._segmentLabels=new F({context:{view:this.view,editGeometryOperations:this._editGeometryOperations,elevationInfo:j(this.graphic),labelOptions:this._labelOptions,graphic:this.graphic,graphicState:this._graphicState},visible:this._labelOptions.enabled}),this._recreatingManipulators=!1}_perGraphicManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const a=[],n=this._manipulatorInfos.some((e=>"vertex"===e.type&&e.manipulator.selected)),o=e===We.SELECTED_OR_ALL&&n;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.grabbing||o&&!r.manipulator.selected||a.push(r),i++);if(0===a.length)return t;this._moveVertices(a,t);if(a.length===i){if(this._updateEventState(qe.MOVING),this.destroyed)return t;this.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,mover:this.graphic})}else{if(this._updateEventState(qe.RESHAPING),this.destroyed)return t;this.emit("reshape",{type:"reshape",mover:this.graphic})}return t}_isMultiVertexSelection(){return this._manipulatorInfos.reduce(((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e),0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(qe.RESHAPING),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:a}=e;if(!t&&!i&&!a)return;const n=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&n.push(o);this._moveVertices(n,e,xe.ACCUMULATE_STEPS),this.emit("reshape",{type:"reshape",mover:this.graphic})}_updateEventState(e){if(e===this._reshapeEventState)return!1;switch(e){case qe.NONE:if(0!==this._numGrabbing||0!==this._numDragging)return!1;switch(this._reshapeEventState){case qe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic})}break;case qe.MOVING:switch(this._reshapeEventState){case qe.NONE:this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic}),this.destroyed||this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic})}break;case qe.RESHAPING:switch(this._reshapeEventState){case qe.NONE:this.emit("reshape",{type:"reshape-start",mover:this.graphic});break;case qe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic}),this.destroyed||this.emit("reshape",{type:"reshape-start",mover:this.graphic})}}if(this.destroyed)return!1;const t=this._reshapeEventState!==e;return this._reshapeEventState=e,t}_createGraphicMoveManipulation(){const{tool:e,view:t}=this,i=this._graphicState;if(this._graphicMoveManipulation=new ae({tool:e,view:t,graphicState:i}),this.enableMoveGraphic){let e=null;this._manipulatorHandles.add(this._graphicMoveManipulation.createDragPipeline(((t,i,a)=>{i.next((e=>this._trackNumDragging(e))).next((t=>("start"===t.action&&(e=this._editGeometryOperations.createUndoGroup()),t))).next((e=>this._perGraphicManipulatorDragAction(We.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip($.XY,e),e))).next((t=>{"end"===t.action&&(this._tooltip.clear(),e=h(e))})),a.next((()=>this._onDragCancel(!0,(()=>e=h(e)))))}))),this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1))))}else this._graphicMoveManipulation.forEachManipulator((e=>{e.grabbable=!1,e.cursor=null}));this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(e.events.on("immediate-click",(e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()})))))}_createMoveManipulation(e){const{graphic:t,tool:i,view:a}=this,n=this._graphicState;this._moveManipulation=new ee({tool:i,view:a,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&K(t),snapToScene:!1,radius:ee.radiusForSymbol(t.symbol)}),this._moveManipulation.forEachManipulator((e=>this.addHandles([e.events.on("immediate-click",(i=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some((e=>e.manipulator.selected))||this.emit("immediate-click",{...i,graphic:t}),i.stopPropagation()})),this._watchAndUpdateGrabState(e,!1)])));const o=e=>t=>{this.addHandles(t.events.on("focus-changed",(({action:t})=>{"focus"===t&&this._tooltipOptions.enabled?this._updateTranslateTooltip(e):this._tooltip.clear()})))};this._moveManipulation.xyManipulation.forEachManipulator(o($.XY)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o($.XY_AXIS)),this._moveManipulation.zManipulation.forEachManipulator(o($.Z)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const r=t.geometry.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline(((a,n,o,r,s)=>{const{snappingStep:l,cancelSnapping:p}=be({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new Oe({editGeometryOperations:this._editGeometryOperations,elevationInfo:e,pointer:s,excludeFeature:t,visualizer:new z}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next((e=>(this._onDragCancel(),e))).next(p),{steps:o=o.next((e=>this._trackNumDragging(e))).next((e=>{const t=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return e.manipulatorType===W.TRANSLATE_XY&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e})).next(ce(this.view,e,t)).next(...l).next(me()).next((e=>this._perGraphicManipulatorDragAction(We.SELECTED_OR_ALL,e))).next((e=>(this._updateTranslateTooltip(a,e),e))),cancel:r}}),e,r,t),m((()=>n.displaying),(()=>this._updateMoveManipulationPosition()),_),n.on("changed",(()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()})),m((()=>n.isDraped),(e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?this.addHandles(this.view.elevationProvider.on("elevation-change",(()=>this._updateMoveManipulationPosition())),t):this.removeHandles(t)}),_)])}_createVisualElements(){const{graphic:e,view:t}=this,i=J({view:t,graphic:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._graphicMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,W.TRANSLATE_XY)}},onManipulatorsChanged:e=>this.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof le?i.visualElement:null),null!=this._outlineVisualElement&&this._manipulatorHandles.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>{this._graphicState.isDraped||this._updateMoveManipulationPosition()}))),this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=j(this.graphic)){const i=B(this.view.effectiveTheme).manipulators.edgeOffset,a=i.size/2,n=a+i.collisionPadding,o=a/n,s=o*Math.sqrt(3)/2;null==this._edgeOffsetManipulatorGeometryInside&&(this._edgeOffsetManipulatorGeometryInside=he(this._edgeOffsetManipulatorMaterial,s,o/2,o/2,i.height,i.offset)),null==this._edgeOffsetManipulatorGeometryOutside&&(this._edgeOffsetManipulatorGeometryOutside=he(this._edgeOffsetManipulatorMaterial,-s,o/2,o/2,i.height,-i.offset));const l=[new R(this._edgeOffsetManipulatorGeometryInside.instantiate(),ve.Unfocused),new R(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused),new R(this._edgeOffsetManipulatorGeometryOutside.instantiate(),ve.Unfocused),new R(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused)],p=new U({view:this.view,renderObjects:l,elevationInfo:"on-the-ground"!==t.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:n,available:!(!this.graphic.visible||!this.graphic.layer?.visible),collisionType:{type:"disc",direction:w(0,0,1)},collisionPriority:1,metadata:{deleting:!1}}),h=new U({view:this.view,worldSized:!0,worldOriented:!1,available:!(!this.graphic.visible||!this.graphic.layer?.visible),collisionPriority:-10,cursor:this.enableMoveGraphic?"move":"default",metadata:{deleting:!1}}),d={manipulator:p,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:h,elevationInfo:t,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(d,i.minSquaredEdgeLength),this._updateEdgeOffsetManipulator(d);const u=[];for(const r of[d.handle.leftVertex,d.handle.rightVertex]){const e=this._getManipulatorInfoFromHandle(r);null!=e&&u.push(e.manipulator.events.on("location-update",(()=>this._updateEdgeOffsetManipulator(d))))}d.locationUpdateHandle=r(u),this._manipulatorHandles.add(d.locationUpdateHandle,p),this._manipulatorHandles.add([this._watchAndUpdateGrabState(p,!0),this._watchAndUpdateGrabState(h,!0)],p),this._manipulatorHandles.add(ge(p,this._createEdgeOffsetPipeline(d,t)),p),this._manipulatorHandles.add(ge(h,((e,i,a,n)=>{if("touch"===n){this._createEdgeOffsetPipeline(d,t)(e,i,a)}else if(this.enableMoveGraphic){const n=this.graphic,o=null!=n.geometry?n.geometry.spatialReference:null;i.next((e=>this._trackNumDragging(e))).next(_e(this.view,e.elevationAlignedLocation)).next(Y(this.view,e.elevationAlignedLocation,t,o,n)).next(fe()).next(me()).next((e=>this._perGraphicManipulatorDragAction(We.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip($.XY,e),e))).next((e=>{"end"===e.action&&this._tooltip.clear()})),a.next((()=>this._onDragCancel(!e.metadata.deleting)))}})),p);const c=e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()};return this._manipulatorHandles.add([p.events.on("immediate-click",c),h.events.on("immediate-click",c),p.events.on("focus-changed",(({action:e})=>{const t=this._tooltipOptions;if("focus"===e&&t.enabled){const e=this._tooltip.info=new Ee({tooltipOptions:t});this._updateTooltipAreaOrTotalLength(e)}else this._tooltip.clear()}))],p),this._manipulatorInfos.push(d),this.manipulators.add(p),this.manipulators.add(h),this.emit("manipulators-changed"),d}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,a=e.edgeManipulator,n=()=>{e.visibilityHandle=h(e.visibilityHandle);const n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=n&&null!=o&&se(n.manipulator.renderLocation,o.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!a.focused||l)&&(i.grabbable=!l,a.grabbable=!l,e.visibilityHandle=r([i.disableDisplay(),s((()=>{i.grabbable=!0,a.grabbable=this.enableMoveGraphic}))]))};this._manipulatorHandles.add([i.events.on("focus-changed",n),a.events.on("focus-changed",n),s((()=>{h(e.visibilityHandle),a.metadata.deleting=!0,this.manipulators.remove(a)}))],i),n()}_updateEdgeOffsetManipulator(e){this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._editGeometryOperations.data,i=ne(this.view,e.manipulator.elevationAlignedLocation,oe(t,e.handle,e.manipulator.elevationInfo)),a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==a||null==n)return;const o=a.manipulator.renderLocation,r=n.manipulator.renderLocation,s=null!=i?re(i,o,r):y;e.manipulator.modelTransform=s,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=s;const l=x(O(Xe,o,r))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgeOffsetPipeline(e,t){return(i,a,n)=>{this._clearSelection();const{step:o,cleanup:r}=this._initializeEdgeOffset(e,t);a.next((e=>this._trackNumDragging(e))).next(_e(this.view,i.elevationAlignedLocation)).next(o).next(X(this.view)).next(Z(this.view,this._editGeometryOperations.data.spatialReference)).next(me()).next(this._applyComputeEdgeOffsetDistanceStep()).next(this._applyEdgeOffsetStep(e)).next(this._showEdgeOffsetTooltip()).next((e=>{"end"===e.action&&r()})),n.next((()=>{i.metadata.deleting||(r(),this._onDragCancel())}))}}_initializeEdgeOffset(e,t){const{view:i}=this,n=this._editGeometryOperations,o=oe(n.data.coordinateHelper,e.handle,t),s=n.createUndoGroup(),p=ne(i,e.manipulator.elevationAlignedLocation,o);if(o.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftEdge);null!=t&&this._splitEdgeManipulator(t,1)}if(o.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);null!=t&&this._splitEdgeManipulator(t,0)}const d=()=>new H({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:n.data.spatialReference}),u=B(i.effectiveTheme),c=new le({view:i,isDraped:this._graphicState.isDraped,geometry:d(),elevationInfo:e.elevationInfo,width:u.visualElements.lineGraphics.outline.width,color:a(u.colors.accent),attached:!0,isDecoration:!0});let g;const _=()=>{this._cleanEdgeOffsetCollapsedEdges(e),g=h(g)},f=this.on("undo",_);return g=r([l(c),m((()=>this._graphicState.isDraped),(e=>c.isDraped=e)),this._graphicState.on("changed",(()=>c.geometry=d())),s,f]),{step:e=>null==o||null==p?(_(),null):{...e,operation:o,plane:p},cleanup:_}}_applyEdgeOffsetStep(e){return t=>{if(this.destroyed||null==t.operation)return t;this._updateEventState(qe.RESHAPING);const{mapDeltaX:i,mapDeltaY:a,mapDeltaZ:n}=t;return(i||a||n)&&(this._offsetEdge(e,t),this.emit("reshape",{type:"reshape",mover:this.graphic})),t}}_applyComputeEdgeOffsetDistanceStep(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:("start"===e.action&&t.selectArrowFromStartPoint(i),{...e,signedDistance:t.signedDistanceToPoint(i)})}}_showEdgeOffsetTooltip(){return e=>{const{mapEnd:t,signedDistance:i,operation:a}=e,n=this._tooltip,o=this._tooltipOptions;if(!o.enabled||null==i)return n.clear(),e;let r=n.info;null!=r&&"reshape-edge-offset"===r.type||(r=n.info=new Ee({tooltipOptions:o}));const{coordinateHelper:s}=this._editGeometryOperations.data;return r.distance="end"===e.action?d:Fe(this._graphicState.isDraped,i*a.selectedArrow,t,a.plane,s),this._updateTooltipAreaOrTotalLength(r),e}}_cleanEdgeOffsetCollapsedEdges(e){const t=e.handle.leftVertex.leftEdge?.leftVertex,i=e.handle.leftVertex,a=e.handle.rightVertex.rightEdge?.rightVertex,n=e.handle.rightVertex,o=this._editGeometryOperations.data.coordinateHelper,r=[];if(t&&o.distance(t.pos,i.pos)<Ze){const e=this._getManipulatorInfoFromHandle(i);null!=e&&r.push(e)}if(o.distance(i.pos,n.pos)<Ze||a&&o.distance(a.pos,n.pos)<Ze){const e=this._getManipulatorInfoFromHandle(n);null!=e&&r.push(e)}r.length&&this._removeVertices(r)}_computeVertexManipulatorSizeAndOutline(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}_createVertexOrEdgeManipulator(e,t=j(this.graphic),i=!1){const{view:a}=this,n=B(a.effectiveTheme);if("edge"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(n.manipulators.vertex);this._vertexManipulatorGeometry=de(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=de(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(n.manipulators.edge);this._edgeManipulatorGeometry=de(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=de(this._edgeManipulatorOutlineMaterial,t,16,16)}const{geometry:o}=this.graphic,s=o?.type,l="point"===s||"mesh"===s?[]:[new R(this._vertexManipulatorGeometry.instantiate(),Ye.Vertex|ve.Unselected),new R(this._vertexManipulatorOutlineGeometry.instantiate(),Ye.Vertex|ve.Unfocused|ve.Unselected),new R(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Ye.Vertex|ve.Focused|ve.Unselected),new R(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),ve.Selected),new R(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),ve.Selected|ve.Unfocused),new R(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),ve.Selected|ve.Focused)];this.enableMidpoints&&l.push(new R(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),Ye.Edge|ve.Focused|ve.Unselected),new R(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Ye.Edge|ve.Focused|ve.Unselected),new R(this._edgeManipulatorGeometry.instantiate(),Ye.Edge|ve.Unfocused|ve.Unselected),new R(this._edgeManipulatorOutlineGeometry.instantiate(),Ye.Edge|ve.Unfocused|ve.Unselected));const p=new U({view:a,renderObjects:l,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:!(!this.graphic.visible||!this.graphic.layer?.visible),metadata:{deleting:!1}});p.selected=i,this._setTypeSpecificManipulatorSettings(p,e,t);const d="edge"===e.type?{manipulator:p,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:p,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(d),this.manipulators.add(p),this._updateManipulatorPosition(d),"edge"===d.type){const e=[];for(const t of[d.handle.leftVertex,d.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",(()=>this._updateManipulatorPosition(d))))}d.locationUpdateHandle=r(e),this._manipulatorHandles.add(d.locationUpdateHandle,p)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(p,!0),p);const u=ge(p,((e,i,a,n)=>{let o=null;const{snappingStep:r,cancelSnapping:s}=be({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new Oe({editGeometryOperations:this._editGeometryOperations,elevationInfo:t,pointer:n,excludeFeature:this.graphic,visualizer:new z}),updatingHandles:this._updatingHandles,useZ:!1});a=a.next((t=>(this._onDragCancel(!e.metadata.deleting,(()=>o=h(o))),t))).next(s),i.next((e=>this._trackNumDragging(e))).next((e=>{if("start"===e.action&&(o=this._editGeometryOperations.createUndoGroup()),"edge"===d.type){const t=this._splitEdgeManipulator(d);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:d,snapOrigin:d.handle.pos}})).next(_e(this.view,e.elevationAlignedLocation)).next(q(this.view,this.graphic,e.elevationAlignedLocation,e.location.spatialReference,this.graphic)).next(ce(this.view,t,this.graphic)).next(...r).next(me()).next((t=>{this._perVertexManipulatorDragAction(t),"end"===t.action&&(o=h(o)),this._updateTranslateVertexTooltip(e,$.XY,t)}))}));return this._manipulatorHandles.add([u,p.events.on("immediate-click",(e=>this._manipulatorClickCallback(e,d))),p.events.on("select-changed",(()=>{d.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition()})),p.events.on("focus-changed",(({action:e})=>{"focus"===e&&"edge"!==d.type?this._updateTranslateVertexTooltip(p,$.XY):this._tooltip.clear()}))],p),this.emit("manipulators-changed"),d}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&(this.undo(),this.outputGeometry=null!=this._editGeometryOperations?this._editGeometryOperations.data.geometry:null),null!=this.tool.snappingManager&&this.tool.snappingManager.doneSnapping(),this._tooltip.clear(),this._reshapeEventState){case qe.NONE:break;case qe.MOVING:this.emit("move",{type:"move",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape",mover:this.graphic})}t&&t(),this.destroyed||this._updateEventState(qe.NONE)}_setTypeSpecificManipulatorSettings(e,t,i){const{graphic:a,view:n}=this,o=B(n.effectiveTheme);switch(t.type){case"vertex":{e.state=Ye.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2;const{size:t,collisionPadding:n}=o.manipulators.vertex;e.radius=t/2+n,e.elevationInfo=i;const{geometry:r}=a,s=r?.type;e.interactive=null!=s&&"point"!==s&&"mesh"!==s;break}case"edge":{e.state=Ye.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:n}=o.manipulators.edge;e.radius=t/2+n,e.elevationInfo="on-the-ground"!==i.mode||P(a.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",(i=>this._onGrabStateChanged(e,t,i.action,i.pointerType)))}_onGrabStateChanged(e,t,i,a="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(qe.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==a||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach((e=>{const{manipulator:t}=e,{geometry:i}=this.graphic,a=i?.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=a&&"point"!==a&&"mesh"!==a,"edgeManipulator"in e&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)})),this._graphicMoveManipulation.forEachManipulator((e=>{e.interactive=e.grabbing||!this._numGrabbing})))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1)}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.emit("manipulators-changed"))}_getManipulatorInfoFromHandle(e){if(e)for(const t of this._manipulatorInfos)if(e===t.handle)return t;return null}_updateManipulatorPosition(e){if(null==e)return;const t=this._editGeometryOperations;if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,ze),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==a)return;const n=i.manipulator,o=a.manipulator;if(null!=e.manipulator.elevationInfo&&"on-the-ground"===e.manipulator.elevationInfo.mode){const i=n.location,a=o.location,r=.5,s=i.x+r*(a.x-i.x),l=i.y+r*(a.y-i.y),p=i.hasZ&&a.hasZ?0:void 0;e.manipulator.location=L(s,l,p,t.data.spatialReference)}else b(Xe,n.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=Xe}}_splitEdgeManipulator(e,t=.5){const i=this._editGeometryOperations,a=i.splitEdge(e.handle,t).createdVertex;e.locationUpdateHandle=h(e.locationUpdateHandle);const n=j(this.graphic);let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(a)):(o=e,o.handle=a,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,n)),a.leftEdge&&this._createVertexOrEdgeManipulator(a.leftEdge),a.rightEdge&&this._createVertexOrEdgeManipulator(a.rightEdge),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(o),this.enableEdgeOffset||this._updateTranslateVertexTooltip(o.manipulator,$.XY),this._updateSelection(e.manipulator);const r=this._updateEventState(qe.RESHAPING),s=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.components.indexOf(a.component);return this.emit("vertex-add",{type:"vertex-add",vertices:[{coordinates:s,componentIndex:l,vertexIndex:a.index}],added:s}),r&&this._updateEventState(qe.NONE),o}_updateMoveManipulationPosition(){const e=E(Xe,0,0,0);let t=0,i=!1,a=null,n=null;for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected?(t++,G(e,e,o.manipulator.renderLocation),null==a||o.selectedIndex>a.selectedIndex?(n=a,a=o):(null==n||o.selectedIndex>n.selectedIndex)&&(n=o)):i=!0);if(0===t){const e=this._graphicState.displaying&&this.enableMoveGraphic;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&K(this.graphic),this._moveManipulation.angle=te(this.graphic.geometry),this._moveManipulation.radius=ee.radiusForSymbol(this.graphic.symbol)}else{const e=this._graphicState.displaying;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&K(this.graphic),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=a){const e=a.handle.pos,t=null!=n?n.handle.pos:a.handle.leftEdge&&a.handle.leftEdge.leftVertex?a.handle.leftEdge.leftVertex.pos:null,o=null==n&&a.handle.rightEdge&&a.handle.rightEdge.rightVertex?a.handle.rightEdge.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=Re(t,e):o&&(i=Re(e,o))}this._moveManipulation.angle=i,this._moveManipulation.radius=Q}0!==t&&i?(S(e,e,1/t),ze.spatialReference=this._editGeometryOperations.data.spatialReference,ze.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,ze),this._moveManipulation.elevationAlignedLocation=ze):null==this._outlineVisualElement||this._graphicState.isDraped||null==this._outlineVisualElement.attachmentOrigin?k(this.view,this._moveManipulation,this.graphic):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._editGeometryOperations;for(const a of e)if("vertex"===a.type&&i.canRemoveVertex()){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightEdge));const e=i.removeVertices([a.handle]),n=e.removedVertices?.[0].createdEdge;n&&this._createVertexOrEdgeManipulator(n)}if(t.length>0){const e=t.map((e=>{const t=i.data.components.indexOf(e.component);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}));this.outputGeometry=i.data.geometry;const a=this._updateEventState(qe.RESHAPING);if(this.destroyed)return;if(this.emit("vertex-remove",{type:"vertex-remove",removed:e.map((e=>e.coordinates)),vertices:e}),this.destroyed)return;if(a&&(this._updateEventState(qe.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}_moveVertices(e,t,i=("start"===t.action?xe.NEW_STEP:xe.ACCUMULATE_STEPS)){const a=this._editGeometryOperations;a.moveVertices(e.map((e=>e.handle)),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i),this.outputGeometry=a.data.geometry;for(const n of e)this._updateManipulatorPosition(n)}_offsetEdge(e,t){if(null==t.operation||null==t.signedDistance)return;const i=this._editGeometryOperations,a=t.operation.clone();a.distance=t.signedDistance,i.updateVertices([e.handle.leftVertex,e.handle.rightVertex],a),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,e.button===ue.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===ue.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){const i=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));1===i.length?this._updateTranslateVertexTooltip(i[0].manipulator,e,t):this._updateTranslateGraphicTooltip(e,t)}_updateTranslateGraphicTooltip(e,t){const i=this._tooltipOptions;if(!i.enabled)return;const a=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(e){case $.XY:this._tooltip.info=new Ve({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,t)=>Le(e,t,a)));break;case $.XY_AXIS:this._tooltip.info=new Ie({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,i)=>{const n=Le(e,i,a);return u(n,ie(t))}));break;case $.Z:this._tooltip.info=new we({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,Pe)}}_updateTranslateVertexTooltip(e,t,i){const a=this._tooltipOptions;if(!a.enabled)return;let n;const o=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(t){case $.XY:n=new Ae({tooltipOptions:a}),this._updateTranslateTooltipDistance(n,i,((e,t)=>Le(e,t,o))),this._updateTooltipAreaOrTotalLength(n);break;case $.XY_AXIS:n=new Te({tooltipOptions:a}),this._updateTranslateTooltipDistance(n,i,((e,t)=>{const a=Le(e,t,o);return u(a,ie(i))})),this._updateTooltipAreaOrTotalLength(n);break;case $.Z:n=new He({tooltipOptions:a}),this._updateTranslateTooltipDistance(n,i,Pe)}const r=Ue(e.elevationAlignedLocation);null!=r&&(n.elevation=new Se({actual:r,mode:"absolute-height"})),this._tooltip.info=n}_updateTranslateTooltipDistance(e,t,i){if(null!=t&&"end"!==t.action){const{mapStart:a,mapEnd:n}=t,o=i(a,n);e.distance=null!=o?o:d}}_updateTooltipAreaOrTotalLength(e){const{geometry:t}=this.graphic;if(null==t)return;const i=this._graphicState.isDraped?"on-the-ground":"absolute-height";e.area="polygon"===t.type?De(t,i):null,e.totalLength="polyline"===t.type?je(t,i):null}get test(){return{segmentLabels:this._segmentLabels,tooltip:this._tooltip}}};function Re(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function Fe(e,t,i,a,n){if(e){const e=n.toXYZ(n.pointToVector(i)),o=A(a,e,D.get()),r=Ne(o,e,n.spatialReference);if(null!=r)return c(r.value*Math.sign(t),r.unit)}return c(t*f(i.spatialReference),"meters")}e([v()],ke.prototype,"_editGeometryOperations",void 0),e([v()],ke.prototype,"_segmentLabels",void 0),e([v({constructOnly:!0})],ke.prototype,"tool",void 0),e([v()],ke.prototype,"_tooltip",void 0),e([v()],ke.prototype,"inputGeometry",null),e([v()],ke.prototype,"outputGeometry",void 0),e([v({readOnly:!0})],ke.prototype,"updating",null),e([v()],ke.prototype,"manipulators",null),e([v()],ke.prototype,"view",null),e([v()],ke.prototype,"graphic",null),e([v()],ke.prototype,"enableZShape",null),e([v()],ke.prototype,"enableZVertex",null),e([v()],ke.prototype,"enableMoveGraphic",null),e([v()],ke.prototype,"enableMidpoints",null),e([v()],ke.prototype,"enableEdgeOffset",null),e([v()],ke.prototype,"_labelOptions",null),e([v()],ke.prototype,"_tooltipOptions",null),ke=e([M("esri.views.3d.interactive.editingTools.reshapeGraphic.ReshapeOperation")],ke);const ze=L(0,0,void 0,Ce.WGS84),Xe=I(),Ze=1e-6;var Ye,qe,We;!function(e){e.Vertex=Me.Custom1,e.Edge=Me.Custom2}(Ye||(Ye={})),function(e){e[e.NONE=0]="NONE",e[e.MOVING=1]="MOVING",e[e.RESHAPING=2]="RESHAPING"}(qe||(qe={})),function(e){e[e.ALL=0]="ALL",e[e.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"}(We||(We={}));export{ke as ReshapeOperation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createRenderScreenPointArray3 as e}from"../../../../../core/screenUtils.js";import{f as r}from"../../../../../chunks/mat4f64.js";import{
|
|
5
|
+
import{createRenderScreenPointArray3 as e}from"../../../../../core/screenUtils.js";import{f as r}from"../../../../../chunks/mat4f64.js";import{b as o,C as n,o as t,f as s}from"../../../../../chunks/vec3.js";import{c}from"../../../../../chunks/vec3f64.js";import{normal as i,fromPositionAndNormal as u,create as d}from"../../../../../geometry/support/plane.js";import{makeDehydratedPoint as l}from"../../../../../layers/graphics/dehydratedPoint.js";import{PlaneType as f,OffsetEdgeVertex as p}from"../../../../interactive/editGeometry/operations/OffsetEdgeVertex.js";function a(e,r,o){const n="on-the-ground"===o.mode?f.XY:f.XYZ;return new p(e,n,r,0)}function m(e,r,n){const t=c();if(!e.renderCoordsHelper.toRenderCoords(r,t))return null;const s=j(e,r,i(n.plane)),l=j(e,r,n.edgeDirection);if(null==s||null==l)return null;const f=o(c(),s,l);return u(t,f,d())}function j(e,r,o){const t=l(r.x+o[0],r.y+o[1],r.z+o[2],r.spatialReference),s=c(),i=c();return e.renderCoordsHelper.toRenderCoords(r,s)&&e.renderCoordsHelper.toRenderCoords(t,i)?n(i,s,i):null}function C(e,t,s){const u=i(e),d=n(c(),t,s),l=o(c(),d,u),f=o(c(),d,l);return r(d[0],d[1],d[2],0,l[0],l[1],l[2],0,f[0],f[1],f[2],0,0,0,0,1)}function h(r,o,n){const c=n.projectToRenderScreen(r,e()),i=n.projectToRenderScreen(o,e());return null!=c&&null!=i?t(s(c,c,i)):0}export{m as createEdgeOffsetIntersectionPlane,a as createEdgeOffsetOperation,C as edgeOffsetRotationMatrix,h as screenEdgeLengthSquared};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{multiplyOpacity as e,unitRGBAFromColor as i}from"../../../../../core/colorUtils.js";import a from"../../../../../core/Evented.js";import{makeHandle as s}from"../../../../../core/handleUtils.js";import{rad2deg as o}from"../../../../../core/mathUtils.js";import{createLength as r}from"../../../../../core/quantityUtils.js";import{watch as n,initial as p}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as l}from"../../../../../core/screenUtils.js";import{lengthUnitFromSpatialReference as h,getMetersPerCartesianUnitForSR as c,getMetersPerUnitForSR as u}from"../../../../../core/unitUtils.js";import{property as d}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as _}from"../../../../../chunks/mat4.js";import{s as g,c as v,e as y}from"../../../../../chunks/vec2.js";import{a as f}from"../../../../../chunks/vec2f64.js";import{i as S,q as M,g as b,n as T,l as E,d as x}from"../../../../../chunks/vec3.js";import{c as A,a as B}from"../../../../../chunks/vec3f64.js";import{containsXY as O}from"../../../../../geometry/support/aaBoundingRect.js";import{a as R,c as j}from"../../../../../chunks/boundedPlane.js";import{intersectRay as G,create as D,normal as w}from"../../../../../geometry/support/plane.js";import{create as P}from"../../../../../geometry/support/ray.js";import{sv2d as z,sv3d as U,sm4d as I}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as Z}from"../../../../../support/elevationInfoUtils.js";import{createShiftManipulator as C,OffsetMode as H,IsShiftEdgeOnScreenFlag as k,createResizeManipulator as L,resizeNormal as N,resizeOutlineOnly as V,isDiagonalResizeHandle as X,calculateDiagonalResizeHandleScale as Y,createRotatePlane as F,RotationAxis as q,calculateBoundedPlaneTranslateRotate as W,updateRotateHeadingHandle as J,updateResizeHandle as K}from"../../../analysis/Slice/sliceToolUtils.js";import{getRotateHeadingTexture as Q}from"../../../analysis/Slice/images/Factory.js";import{Manipulator3D as $}from"../../Manipulator3D.js";import{createRotateManipulator as tt,getGraphicAttachmentOrigin as et,calculateInputRotationTransform as it}from"../../manipulatorUtils.js";import{screenToZConstrained as at,screenToRenderPlane as st}from"../dragEventPipeline3D.js";import{ManipulatorType as ot}from"../ManipulatorType.js";import{canMoveZ as rt}from"../manipulatorUtils.js";import{getSettings as nt}from"../settings.js";import{createVisualElements as pt}from"../visualElementUtils.js";import{ManipulationType as lt}from"../manipulations/MoveManipulation.js";import{MoveXYGraphicManipulation as ht}from"../manipulations/MoveXYGraphicManipulation.js";import{PreserveAspectRatio as ct}from"./PreserveAspectRatio.js";import{OutlineVisualElement as ut}from"../../visualElements/OutlineVisualElement.js";import{evaluateElevationAlignmentAtPoint as dt}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as mt}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as _t}from"../../../layers/graphics/GraphicState.js";import{fromScreen as gt}from"../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as vt,addMapDelta as yt,addScreenDelta as ft}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as St}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as Mt}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as bt}from"../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as Tt}from"../../../../interactive/editGeometry/operations/UpdateVertices.js";import{mapPlaneAutoHorizontalSizeByElevationMode as Et,calculateOrientedBounds as xt,mapPlaneToRenderPlane as At,apply as Bt,unapply as Ot}from"../../../../interactive/editGeometry/support/editPlaneUtils.js";import Rt from"../../../../interactive/sketch/SketchTooltipOptions.js";import{ExtentRotateTooltipInfo as jt,ExtentScaleTooltipInfo as Gt}from"../../../../interactive/tooltip/ExtentTooltipInfos.js";import{Tooltip as Dt}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicTooltipInfo as wt,TranslateGraphicZTooltipInfo as Pt}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as zt}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as Ut}from"../../../../support/euclideanLengthMeasurementUtils.js";let It=class extends(a.EventedMixin(St)){constructor(t){super(t),this.enableZ=!0,this.enableRotation=!0,this.enableScaling=!0,this.tooltipOptions=new Rt,this._preserveAspectRatio=new ct,this.grabbing=!1,this.inputState=null,this.type="transform-3d",this._attachmentOrigin=null,this._outlineVisualElement=null,this._mapBounds=R(),this._mapBoundsStart=R(),this._zmax=0,this._sizeStart=null,this._displayBounds=R(),this._displayBoundsStart=R(),this._displayBoundsMarginStart=0,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._rotateTooltipInfo=null,this._scaleTooltipInfo=null,this._startAngle=0,this._endAngle=0,this._startScale=f(),this._endScale=f()}initialize(){const{view:t,graphic:a,manipulators:o}=this,r=nt(t.effectiveTheme).colors,l=this._graphicState=new _t({graphic:a}),h=a.geometry;this._editGeometryOperations=Mt.fromGeometry(h,t.state.viewingMode),this._graphicMoveManipulation=new ht({tool:this,view:t,graphicState:l}),this._moveZManipulator=C(t,{offsetMode:H.CENTER_ON_CALLOUT,calloutColor:r.accent,color:r.contrast,outlineColor:r.accent}),this._moveZManipulator.state|=k,this.addHandles([this._createMoveXYGraphicDragPipeline(),n((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._moveZManipulator,ot.TRANSLATE_Z))),this._createMoveZDragPipeline()]),o.add(this._moveZManipulator),this._resizeManipulators=this._resizeHandles.map((e=>{const i=L(t,e,{color:r.accent});return this.addHandles([n((()=>this.enableScaling),(()=>this._updateManipulatorAvailability(i,ot.SCALE))),i.events.on("grab-changed",(t=>this._onResizeGrab(t))),this._createResizeDragPipeline(i,e)]),i})),o.addMany(this._resizeManipulators);const c=!this.view._stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this._rotateManipulatorTexture=Q(t.toolViewManager.textures,{accentColor:e(r.accent,.5),contrastColor:r.contrast,preMultiplyAlpha:c}),this._rotateManipulator=tt(t,{calloutColor:i(r.accent),texture:this._rotateManipulatorTexture.texture}),this.addHandles([n((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._rotateManipulator,ot.ROTATE))),this._rotateManipulator.events.on("grab-changed",(t=>{this._onRotateGrab(t)})),this._createRotateDragPipeline(this._rotateManipulator)]),o.add(this._rotateManipulator),this._calculateMapBounds(),this._updateDisplayBounds();const u=pt({view:t,graphic:a,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>s()});null!=u&&(this._outlineVisualElement=u.visualElement instanceof ut?u.visualElement:null),null!=this._outlineVisualElement&&this.addHandles(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>this._updateDisplayBounds()))),u&&this.addHandles(u),this.addHandles([l.on("changed",(()=>this._onGeometryChanged())),n((()=>l.displaying),(()=>this._updateAllManipulatorAvailability())),n((()=>l.isDraped),(()=>this._graphicDrapedChanged()),p),t.trackGraphicState(l)]);const d=t.pointsOfInterest;this.addHandles(n((()=>d?.centerOnSurfaceFrequent.location),(()=>this._updateDisplayBounds())));const m=t=>{this.addHandles(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(m);const _=(t,e)=>{this.addHandles(t.events.on("immediate-click",(t=>{e===ot.TRANSLATE_XY&&this.emit("immediate-click",{...t,graphic:a}),t.stopPropagation()})))};this._forEachManipulator(_),this._onGeometryChanged(),this._updateAllManipulatorAvailability(),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._mapBounds=null,this._displayBounds=null,this._rotateManipulatorTexture.release(),this._graphicMoveManipulation.destroy(),this._editGeometryOperations.destroy(),this._tooltip.destroy(),this._set("view",null),this._set("graphic",null)}_initializeTooltip(){const{view:t}=this,e=this._tooltip=new Dt({view:t}),i=()=>{e.info=this._getUpdatedTooltipInfo()};this.addHandles([this.on("graphic-translate-start",i),this.on("graphic-translate",i),this.on("graphic-translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._tooltip.clear()})),this.on("graphic-rotate-start",(t=>{this._startAngle=t.angle,i()})),this.on("graphic-rotate",(t=>{this._endAngle=t.angle,i()})),this.on("graphic-rotate-stop",(()=>{this._startAngle=0,this._endAngle=0,i()})),this.on("graphic-scale-start",(t=>{g(this._startScale,t.xScale,t.yScale),g(this._endScale,t.xScale,t.yScale),i()})),this.on("graphic-scale",(t=>{g(this._endScale,t.xScale,t.yScale),i()})),this.on("graphic-scale-stop",(()=>{g(this._startScale,0,0),g(this._endScale,0,0),i()}))]),this._forEachManipulator((t=>{this.addHandles([t.events.on("focus-changed",i),t.events.on("grab-changed",i),t.events.on("drag",(t=>{"cancel"===t.action?this._tooltip.clear():i()}))])}))}_getUpdatedTooltipInfo(){return this.tooltipOptions.enabled?this._graphicMoveManipulation.grabbing||this._graphicMoveManipulation.dragging?this._computeMoveXYTooltipInfo():this._moveZManipulator.focused?this._computeMoveZTooltipInfo():this._rotateManipulator.focused?this._computeRotateTooltipInfo():this._resizeManipulators.some((t=>t.focused))?this._computeScaleTooltipInfo():null:null}_computeMoveXYTooltipInfo(){return this._moveXYTooltipInfo??=new wt({tooltipOptions:this.tooltipOptions})}_computeMoveZTooltipInfo(){const t=this._moveZTooltipInfo??=new Pt({tooltipOptions:this.tooltipOptions}),e=this._moveUnit;if(this._moveZManipulator.dragging){const e=this._mapBoundsStart.origin,i=this._mapBounds.origin,a=Ut(e,i,this.view.spatialReference);if(null==a)return null;t.distance=a}else t.distance=r(0,e);return t}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo??=new jt({tooltipOptions:this.tooltipOptions});return t.angle=this._startAngle-this._endAngle,t}_computeScaleTooltipInfo(){const t=this.graphic.geometry;if(null==t)return null;const e=this._scaleTooltipInfo??=new Gt({tooltipOptions:this.tooltipOptions}),i=Et(this._mapBounds,this._zmax,t.spatialReference,this._graphicState.isDraped);return null==i?null:(e.xSize=i[0],e.ySize=i[1],null!=this._sizeStart&&this._resizeManipulators.some((t=>t.dragging))?(e.xScale=i[0].value/this._sizeStart[0].value,e.yScale=i[1].value/this._sizeStart[1].value):(e.xScale=1,e.yScale=1),e)}_graphicDrapedChanged(){this.removeHandles(Zt),this._updateDisplayBounds(),this._graphicState.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",(t=>{null!=this._attachmentOrigin&&O(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._updateDisplayBounds()})),Zt)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof $){const a=this._graphicState.displaying,s=this.enableZ&&rt(this.graphic);switch(e){case ot.ROTATE:t.available=a&&this.enableRotation;break;case ot.SCALE:t.available=a&&(this.enableScaling||this.enableRotation||s),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?N:V;break;case ot.TRANSLATE_Z:t.available=a&&s;break;default:t.available=a}}}_forEachManipulator(t){this._graphicMoveManipulation.forEachManipulator(t),this._resizeManipulators.forEach((e=>t(e,ot.SCALE))),t(this._rotateManipulator,ot.ROTATE),t(this._moveZManipulator,ot.TRANSLATE_Z)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get _moveUnit(){return h(this.view.spatialReference)??"meters"}reset(){}_onGeometryChanged(){this._updateDisplayBounds()}_calculateMapBounds(){const t=this.graphic.geometry,e=this._editGeometryOperations.data,i=e.firstNonVerticalEdge(),a=g(z.get(),1,0);i&&(v(a,i.leftVertex.pos,i.rightVertex.pos),y(a,a));const s=this.view.spatialReference,o=t.spatialReference,r=et(this.view,this.graphic)??t.extent?.center,n=r?this.view.pixelSizeAt(r)*c(s)/u(o):0;xt(a,e,Ht*n,this._mapBounds),this._updateZMax()}_updateZMax(){const t=this._editGeometryOperations.data;if(!t.geometry.hasZ)return void(this._zmax=0);const e=t.coordinateHelper;let i=Number.NEGATIVE_INFINITY;for(const a of t.components)for(const t of a.vertices){const a=e.getZ(t.pos)??0;i=Math.max(a,i)}this._zmax=i}_updateDisplayBounds(){const{geometry:t}=this.graphic;if(null==t)return;const{extent:e}=t;if(!e)return;const i=null==this._outlineVisualElement||this._graphicState.isDraped||null==this._outlineVisualElement.attachmentOrigin?et(this.view,this.graphic):this._outlineVisualElement.attachmentOrigin;this._attachmentOrigin=i??e.center;const a=null!=i?i.z:dt(this._mapBounds.origin,this.view.elevationProvider,mt.fromElevationInfo(Z(this.graphic)),this.view.renderCoordsHelper),s=j(this._mapBounds);s.origin[2]=a??0,At(s,this.view.renderCoordsHelper,t.spatialReference,this._displayBoundsMargin,this._displayBounds),this._updateManipulators()}get _displayBoundsMargin(){const t=this.view.pointsOfInterest,e=t?t.centerOnSurfaceFrequent.location:this._editGeometryOperations.data.geometry.extent?.center;return e?Ct*this.view.pixelSizeAt(e):0}_createMoveXYGraphicDragPipeline(){return this._graphicMoveManipulation.createDragPipeline(((t,e,i)=>this._applyGraphicMoveSteps(e,i,lt.XY)))}_createMoveZDragPipeline(){const t=this.view,e=this._editGeometryOperations.data.spatialReference;return vt(this._moveZManipulator,((i,a,s)=>{const o=B(i.renderLocation),r=a.next(at(t,o,e)).next(ft());this._applyGraphicMoveSteps(r,s,lt.Z)}))}_applyGraphicMoveSteps(t,e,i){const a=t.next((t=>("start"===t.action&&(this.inputState={type:"move"},this._updateOperationStartProperties(),this.emit("graphic-translate-start",{graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(yt()).next(this._moveDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&this.emit("graphic-translate",e);break;case"end":this.inputState=null,this.emit("graphic-translate-stop",e)}return t})).next((t=>this._updateMoveTooltip(t,i)));return e.next((()=>{null!=this.inputState&&this.emit("graphic-translate-stop",{graphic:this.graphic,dxScreen:0,dyScreen:0}),this._cancel()})),a}_updateOperationStartProperties(){j(this._displayBounds,this._displayBoundsStart),j(this._mapBounds,this._mapBoundsStart),null!=this.graphic.geometry?this._sizeStart=Et(this._mapBoundsStart,this._zmax,this.graphic.geometry.spatialReference,this._graphicState.isDraped):this._sizeStart=null}_moveDragUpdateGeometry(){return t=>{if(null==this.inputState||"move"!==this.inputState.type)return t;const e=[];for(const s of this._editGeometryOperations.data.components)e.push(...s.vertices);const i="start"===t.action?bt.NEW_STEP:bt.ACCUMULATE_STEPS,a=this._editGeometryOperations.moveVertices(e,t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);return Bt(a,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_updateMoveTooltip(t,e){if(e===lt.XY||e===lt.XY_AXIS){const e=zt(t.mapStart,t.mapEnd,this._graphicState.isDraped?"on-the-ground":"absolute-height");null!=e&&null!=this._moveXYTooltipInfo&&(this._moveXYTooltipInfo.distance=e)}return t}_onResizeGrab({action:t,screenPoint:e}){if("start"!==t||!e)return;const i=this._calculatePickRay(e);G(this._displayBounds.plane,i,U.get())&&(this._updateOperationStartProperties(),this._displayBoundsMarginStart=this._displayBoundsMargin,this.inputState={type:"resize"})}_createResizeDragPipeline(t,e){return vt(t,((t,i,a)=>{null!=this.inputState&&(i.next((t=>("start"===t.action&&this.emit("graphic-scale-start",{graphic:this.graphic,xScale:1,yScale:1}),t))).next(st(this.view,this._displayBoundsStart.plane)).next((t=>({...t,handle:e}))).next(this._resizeDragRenderPlaneToFactors()).next(...this._preserveAspectRatio.createDragEventPipelineStep()).next(this._resizeDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":this.emit("graphic-scale",e);break;case"end":this.inputState=null,this.emit("graphic-scale-stop",e)}return t})),a.next((()=>{null!=this.inputState&&this.emit("graphic-scale-stop",{graphic:this.graphic,xScale:1,yScale:1}),this._cancel()})))}))}_resizeDragRenderPlaneToFactors(){return t=>{const e=this._displayBoundsStart,i=t.handle.direction,a=this._displayBoundsMargin,s=this._displayBoundsMarginStart,o=S(U.get(),e.origin);M(o,o,e.basis1,-i[0]),M(o,o,e.basis2,-i[1]);const r=b(U.get(),t.renderEnd,o),n=b(U.get(),t.renderStart,o),p=X(t.handle),l=Y(e),h=Y(this._displayBounds)/l,c=(t,e)=>{if(0===t)return 1;let i=E(e),o=.5*t*x(e,r)/i;const l=o<0?-1:1;if(p){o+=(i-.5*t*x(e,n)/i)*l*h}const c=i<1.5*s?1:kt;return i=Math.max(i-s,kt),l>0&&(o-=a),l*Math.max(l*(o/i),c)};return{...t,factor1:c(i[0],e.basis1),factor2:c(i[1],e.basis2)}}}_resizeDragUpdateGeometry(){return t=>{const e=S(A(),this._mapBoundsStart.origin);M(e,e,this._mapBoundsStart.basis1,-t.handle.direction[0]),M(e,e,this._mapBoundsStart.basis2,-t.handle.direction[1]);const i=g(f(),this._mapBoundsStart.basis1[0],this._mapBoundsStart.basis1[1]);y(i,i);const a=[];for(const r of this._editGeometryOperations.data.components)a.push(...r.vertices);const s="start"===t.action?bt.NEW_STEP:bt.ACCUMULATE_STEPS,o=this._editGeometryOperations.scaleVertices(a,e,i,t.factor1,t.factor2,s,Tt.REPLACE);return j(this._mapBoundsStart,this._mapBounds),Bt(o,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_onRotateGrab({action:t,screenPoint:e}){if("start"!==t||!e)return;const i=F(this._displayBounds,this.view.renderCoordsHelper,q.HEADING,D()),a=this._calculatePickRay(e);G(i,a,U.get())&&(this._updateOperationStartProperties(),this.inputState={type:"rotate",rotatePlane:i})}_createRotateDragPipeline(t){return vt(t,((t,e,i)=>{const a=this.inputState;null!=a&&(e.next((t=>("start"===t.action&&this.emit("graphic-rotate-start",{graphic:this.graphic,angle:0}),t))).next(st(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,angle:o(t.rotateAngle)};switch(t.action){case"start":case"update":this.emit("graphic-rotate",e);break;case"end":this.inputState=null,this.emit("graphic-rotate-stop",e)}return t})),i.next((()=>{null!=this.inputState&&this.emit("graphic-rotate-stop",{graphic:this.graphic,angle:0}),this._cancel()})))}))}_rotateDragRenderPlaneToRotate(t){return e=>{const i=w(t.rotatePlane),a=it(e.renderStart,e.renderEnd,this._displayBounds.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdateGeometry(){return t=>{const e=S(A(),this._mapBoundsStart.origin),i=[];for(const o of this._editGeometryOperations.data.components)i.push(...o.vertices);const a="start"===t.action?bt.NEW_STEP:bt.ACCUMULATE_STEPS,s=this._editGeometryOperations.rotateVertices(i,e,t.rotateAngle,a,Tt.REPLACE);return j(this._mapBoundsStart,this._mapBounds),Bt(s,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_calculatePickRay(t){const e=P(),i=l(t);return gt(this.view.state.camera,i,e),T(e.direction,e.direction),e}_updateManipulators(){if(!this.visible)return;const t=W(this._displayBounds,I.get());J(this._rotateManipulator,t,this._displayBounds,this.view.renderCoordsHelper),this._updateZMoveHandle(this._moveZManipulator,t),this._resizeManipulators.forEach(((e,i)=>{K(e,this._resizeHandles[i],t,this._displayBounds)}))}_updateZMoveHandle(t,e){const i=this._displayBounds,a={basis:i.basis1,direction:-1,position:b(U.get(),i.origin,i.basis1),edge:2},s=I.get();_(s,e,a.edge*Math.PI/2),s[12]=0,s[13]=0,s[14]=0,t.modelTransform=s,t.renderLocation=a.position}_cancel(){const t=this._editGeometryOperations.lastOperation;null!=t&&(this._editGeometryOperations.undo(),this.graphic.geometry=this._editGeometryOperations.data.geometry,Ot(t,this._mapBounds),this._updateDisplayBounds(),this.inputState=null)}get canUndo(){return this._editGeometryOperations.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this._editGeometryOperations.undo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Ot(t,this._mapBounds),this._updateDisplayBounds()}}get canRedo(){return this._editGeometryOperations.canRedo}redo(){if(this.canRedo){const t=this._editGeometryOperations.redo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Bt(t,this._mapBounds),this._updateDisplayBounds()}}get test(){return{resizeManipulators:this._resizeManipulators,rotateManipulator:this._rotateManipulator,moveZManipulator:this._moveZManipulator,tooltip:this._tooltip}}};t([d({constructOnly:!0,nonNullable:!0})],It.prototype,"view",void 0),t([d({constructOnly:!0,nonNullable:!0})],It.prototype,"graphic",void 0),t([d({constructOnly:!0,nonNullable:!0})],It.prototype,"enableZ",void 0),t([d()],It.prototype,"enableRotation",void 0),t([d()],It.prototype,"enableScaling",void 0),t([d({constructOnly:!0,type:Rt})],It.prototype,"tooltipOptions",void 0),t([d()],It.prototype,"preserveAspectRatio",null),t([d()],It.prototype,"grabbing",void 0),t([d()],It.prototype,"inputState",void 0),t([d({readOnly:!0})],It.prototype,"type",void 0),t([d()],It.prototype,"_moveUnit",null),It=t([m("esri.views.3d.interactive.editingTools.graphicTransform3D.ExtentTransformTool")],It);const Zt="draped-elevation-changes",Ct=10,Ht=80,kt=1e-6;export{kt as EPSILON,It as ExtentTransformTool};
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{multiplyOpacity as e,unitRGBAFromColor as i}from"../../../../../core/colorUtils.js";import a from"../../../../../core/Evented.js";import{makeHandle as s}from"../../../../../core/handleUtils.js";import{rad2deg as o}from"../../../../../core/mathUtils.js";import{createLength as r}from"../../../../../core/quantityUtils.js";import{watch as n,initial as p}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as l}from"../../../../../core/screenUtils.js";import{lengthUnitFromSpatialReference as h,getMetersPerCartesianUnitForSR as c,getMetersPerUnitForSR as u}from"../../../../../core/unitUtils.js";import{property as d}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as _}from"../../../../../chunks/mat4.js";import{s as g,c as v,e as y}from"../../../../../chunks/vec2.js";import{a as f}from"../../../../../chunks/vec2f64.js";import{c as S,y as M,f as b,n as T,l as E,j as x}from"../../../../../chunks/vec3.js";import{c as A,g as B}from"../../../../../chunks/vec3f64.js";import{containsXY as O}from"../../../../../geometry/support/aaBoundingRect.js";import{a as j,c as R}from"../../../../../chunks/boundedPlane.js";import{intersectRay as G,create as D,normal as w}from"../../../../../geometry/support/plane.js";import{create as P}from"../../../../../geometry/support/ray.js";import{sv2d as z,sv3d as U,sm4d as I}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as Z}from"../../../../../support/elevationInfoUtils.js";import{getRotateHeadingTexture as C}from"../../../analysis/images/Factory.js";import{createShiftManipulator as H,OffsetMode as k,IsShiftEdgeOnScreenFlag as L,createResizeManipulator as N,resizeNormal as V,resizeOutlineOnly as X,isDiagonalResizeHandle as Y,calculateDiagonalResizeHandleScale as F,createRotatePlane as q,RotationAxis as W,calculateBoundedPlaneTranslateRotate as J,updateRotateHeadingHandle as K,updateResizeHandle as Q}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as $}from"../../Manipulator3D.js";import{createRotateManipulator as tt,getGraphicAttachmentOrigin as et,calculateInputRotationTransform as it}from"../../manipulatorUtils.js";import{screenToZConstrained as at,screenToRenderPlane as st}from"../dragEventPipeline3D.js";import{ManipulatorType as ot}from"../ManipulatorType.js";import{canMoveZ as rt}from"../manipulatorUtils.js";import{getSettings as nt}from"../settings.js";import{createVisualElements as pt}from"../visualElementUtils.js";import{ManipulationType as lt}from"../manipulations/MoveManipulation.js";import{MoveXYGraphicManipulation as ht}from"../manipulations/MoveXYGraphicManipulation.js";import{PreserveAspectRatio as ct}from"./PreserveAspectRatio.js";import{OutlineVisualElement as ut}from"../../visualElements/OutlineVisualElement.js";import{evaluateElevationAlignmentAtPoint as dt}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as mt}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as _t}from"../../../layers/graphics/GraphicState.js";import{fromScreen as gt}from"../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as vt,addMapDelta as yt,addScreenDelta as ft}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as St}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as Mt}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as bt}from"../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as Tt}from"../../../../interactive/editGeometry/operations/UpdateVertices.js";import{mapPlaneAutoHorizontalSizeByElevationMode as Et,calculateOrientedBounds as xt,mapPlaneToRenderPlane as At,apply as Bt,unapply as Ot}from"../../../../interactive/editGeometry/support/editPlaneUtils.js";import jt from"../../../../interactive/sketch/SketchTooltipOptions.js";import{ExtentRotateTooltipInfo as Rt,ExtentScaleTooltipInfo as Gt}from"../../../../interactive/tooltip/ExtentTooltipInfos.js";import{Tooltip as Dt}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicTooltipInfo as wt,TranslateGraphicZTooltipInfo as Pt}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as zt}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as Ut}from"../../../../support/euclideanLengthMeasurementUtils.js";let It=class extends(a.EventedMixin(St)){constructor(t){super(t),this.enableZ=!0,this.enableRotation=!0,this.enableScaling=!0,this.tooltipOptions=new jt,this._preserveAspectRatio=new ct,this.grabbing=!1,this.inputState=null,this.type="transform-3d",this._attachmentOrigin=null,this._outlineVisualElement=null,this._mapBounds=j(),this._mapBoundsStart=j(),this._zmax=0,this._sizeStart=null,this._displayBounds=j(),this._displayBoundsStart=j(),this._displayBoundsMarginStart=0,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._rotateTooltipInfo=null,this._scaleTooltipInfo=null,this._startAngle=0,this._endAngle=0,this._startScale=f(),this._endScale=f()}initialize(){const{view:t,graphic:a,manipulators:o}=this,r=nt(t.effectiveTheme).colors,l=this._graphicState=new _t({graphic:a}),h=a.geometry;this._editGeometryOperations=Mt.fromGeometry(h,t.state.viewingMode),this._graphicMoveManipulation=new ht({tool:this,view:t,graphicState:l}),this._moveZManipulator=H(t,{offsetMode:k.CENTER_ON_CALLOUT,calloutColor:r.accent,color:r.contrast,outlineColor:r.accent}),this._moveZManipulator.state|=L,this.addHandles([this._createMoveXYGraphicDragPipeline(),n((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._moveZManipulator,ot.TRANSLATE_Z))),this._createMoveZDragPipeline()]),o.add(this._moveZManipulator),this._resizeManipulators=this._resizeHandles.map((e=>{const i=N(t,e,{color:r.accent});return this.addHandles([n((()=>this.enableScaling),(()=>this._updateManipulatorAvailability(i,ot.SCALE))),i.events.on("grab-changed",(t=>this._onResizeGrab(t))),this._createResizeDragPipeline(i,e)]),i})),o.addMany(this._resizeManipulators);const c=!this.view._stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this._rotateManipulatorTexture=C(t.toolViewManager.textures,{accentColor:e(r.accent,.5),contrastColor:r.contrast,preMultiplyAlpha:c}),this._rotateManipulator=tt(t,{calloutColor:i(r.accent),texture:this._rotateManipulatorTexture.texture}),this.addHandles([n((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._rotateManipulator,ot.ROTATE))),this._rotateManipulator.events.on("grab-changed",(t=>this._onRotateGrab(t))),this._createRotateDragPipeline(this._rotateManipulator)]),o.add(this._rotateManipulator),this._calculateMapBounds(),this._updateDisplayBounds();const u=pt({view:t,graphic:a,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>s()});null!=u&&(this._outlineVisualElement=u.visualElement instanceof ut?u.visualElement:null),null!=this._outlineVisualElement&&this.addHandles(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>this._updateDisplayBounds()))),u&&this.addHandles(u),this.addHandles([l.on("changed",(()=>this._onGeometryChanged())),n((()=>l.displaying),(()=>this._updateAllManipulatorAvailability())),n((()=>l.isDraped),(()=>this._graphicDrapedChanged()),p),t.trackGraphicState(l)]);const d=t.pointsOfInterest;this.addHandles(n((()=>d?.centerOnSurfaceFrequent.location),(()=>this._updateDisplayBounds())));const m=t=>{this.addHandles(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(m);const _=(t,e)=>{this.addHandles(t.events.on("immediate-click",(t=>{e===ot.TRANSLATE_XY&&this.emit("immediate-click",{...t,graphic:a}),t.stopPropagation()})))};this._forEachManipulator(_),this._onGeometryChanged(),this._updateAllManipulatorAvailability(),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._mapBounds=null,this._displayBounds=null,this._rotateManipulatorTexture.release(),this._graphicMoveManipulation.destroy(),this._editGeometryOperations.destroy(),this._tooltip.destroy(),this._set("view",null),this._set("graphic",null)}_initializeTooltip(){const{view:t}=this,e=this._tooltip=new Dt({view:t}),i=()=>{e.info=this._getUpdatedTooltipInfo()};this.addHandles([this.on("graphic-translate-start",i),this.on("graphic-translate",i),this.on("graphic-translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._tooltip.clear()})),this.on("graphic-rotate-start",(t=>{this._startAngle=t.angle,i()})),this.on("graphic-rotate",(t=>{this._endAngle=t.angle,i()})),this.on("graphic-rotate-stop",(()=>{this._startAngle=0,this._endAngle=0,i()})),this.on("graphic-scale-start",(t=>{g(this._startScale,t.xScale,t.yScale),g(this._endScale,t.xScale,t.yScale),i()})),this.on("graphic-scale",(t=>{g(this._endScale,t.xScale,t.yScale),i()})),this.on("graphic-scale-stop",(()=>{g(this._startScale,0,0),g(this._endScale,0,0),i()}))]),this._forEachManipulator((t=>{this.addHandles([t.events.on("focus-changed",i),t.events.on("grab-changed",i),t.events.on("drag",(t=>{"cancel"===t.action?this._tooltip.clear():i()}))])}))}_getUpdatedTooltipInfo(){return this.tooltipOptions.enabled?this._graphicMoveManipulation.grabbing||this._graphicMoveManipulation.dragging?this._computeMoveXYTooltipInfo():this._moveZManipulator.focused?this._computeMoveZTooltipInfo():this._rotateManipulator.focused?this._computeRotateTooltipInfo():this._resizeManipulators.some((t=>t.focused))?this._computeScaleTooltipInfo():null:null}_computeMoveXYTooltipInfo(){return this._moveXYTooltipInfo??=new wt({tooltipOptions:this.tooltipOptions})}_computeMoveZTooltipInfo(){const t=this._moveZTooltipInfo??=new Pt({tooltipOptions:this.tooltipOptions}),e=this._moveUnit;if(this._moveZManipulator.dragging){const e=this._mapBoundsStart.origin,i=this._mapBounds.origin,a=Ut(e,i,this.view.spatialReference);if(null==a)return null;t.distance=a}else t.distance=r(0,e);return t}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo??=new Rt({tooltipOptions:this.tooltipOptions});return t.angle=this._startAngle-this._endAngle,t}_computeScaleTooltipInfo(){const t=this.graphic.geometry;if(null==t)return null;const e=this._scaleTooltipInfo??=new Gt({tooltipOptions:this.tooltipOptions}),i=Et(this._mapBounds,this._zmax,t.spatialReference,this._graphicState.isDraped);return null==i?null:(e.xSize=i[0],e.ySize=i[1],null!=this._sizeStart&&this._resizeManipulators.some((t=>t.dragging))?(e.xScale=i[0].value/this._sizeStart[0].value,e.yScale=i[1].value/this._sizeStart[1].value):(e.xScale=1,e.yScale=1),e)}_graphicDrapedChanged(){this.removeHandles(Zt),this._updateDisplayBounds(),this._graphicState.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",(t=>{null!=this._attachmentOrigin&&O(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._updateDisplayBounds()})),Zt)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof $){const a=this._graphicState.displaying,s=this.enableZ&&rt(this.graphic);switch(e){case ot.ROTATE:t.available=a&&this.enableRotation;break;case ot.SCALE:t.available=a&&(this.enableScaling||this.enableRotation||s),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?V:X;break;case ot.TRANSLATE_Z:t.available=a&&s;break;default:t.available=a}}}_forEachManipulator(t){this._graphicMoveManipulation.forEachManipulator(t),this._resizeManipulators.forEach((e=>t(e,ot.SCALE))),t(this._rotateManipulator,ot.ROTATE),t(this._moveZManipulator,ot.TRANSLATE_Z)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get _moveUnit(){return h(this.view.spatialReference)??"meters"}reset(){}_onGeometryChanged(){this._updateDisplayBounds()}_calculateMapBounds(){const t=this.graphic.geometry,e=this._editGeometryOperations.data,i=e.firstNonVerticalEdge(),a=g(z.get(),1,0);i&&(v(a,i.leftVertex.pos,i.rightVertex.pos),y(a,a));const s=this.view.spatialReference,o=t.spatialReference,r=et(this.view,this.graphic)??t.extent?.center,n=r?this.view.pixelSizeAt(r)*c(s)/u(o):0;xt(a,e,Ht*n,this._mapBounds),this._updateZMax()}_updateZMax(){const t=this._editGeometryOperations.data;if(!t.geometry.hasZ)return void(this._zmax=0);const e=t.coordinateHelper;let i=Number.NEGATIVE_INFINITY;for(const a of t.components)for(const t of a.vertices){const a=e.getZ(t.pos)??0;i=Math.max(a,i)}this._zmax=i}_updateDisplayBounds(){const{geometry:t}=this.graphic;if(null==t)return;const{extent:e}=t;if(!e)return;const i=null==this._outlineVisualElement||this._graphicState.isDraped||null==this._outlineVisualElement.attachmentOrigin?et(this.view,this.graphic):this._outlineVisualElement.attachmentOrigin;this._attachmentOrigin=i??e.center;const a=null!=i?i.z:dt(this._mapBounds.origin,this.view.elevationProvider,mt.fromElevationInfo(Z(this.graphic)),this.view.renderCoordsHelper),s=R(this._mapBounds);s.origin[2]=a??0,At(s,this.view.renderCoordsHelper,t.spatialReference,this._displayBoundsMargin,this._displayBounds),this._updateManipulators()}get _displayBoundsMargin(){const t=this.view.pointsOfInterest,e=t?t.centerOnSurfaceFrequent.location:this._editGeometryOperations.data.geometry.extent?.center;return e?Ct*this.view.pixelSizeAt(e):0}_createMoveXYGraphicDragPipeline(){return this._graphicMoveManipulation.createDragPipeline(((t,e,i)=>this._applyGraphicMoveSteps(e,i,lt.XY)))}_createMoveZDragPipeline(){const t=this.view,e=this._editGeometryOperations.data.spatialReference;return vt(this._moveZManipulator,((i,a,s)=>{const o=B(i.renderLocation),r=a.next(at(t,o,e)).next(ft());this._applyGraphicMoveSteps(r,s,lt.Z)}))}_applyGraphicMoveSteps(t,e,i){const a=t.next((t=>("start"===t.action&&(this.inputState={type:"move"},this._updateOperationStartProperties(),this.emit("graphic-translate-start",{graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(yt()).next(this._moveDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&this.emit("graphic-translate",e);break;case"end":this.inputState=null,this.emit("graphic-translate-stop",e)}return t})).next((t=>this._updateMoveTooltip(t,i)));return e.next((()=>{null!=this.inputState&&this.emit("graphic-translate-stop",{graphic:this.graphic,dxScreen:0,dyScreen:0}),this._cancel()})),a}_updateOperationStartProperties(){R(this._displayBounds,this._displayBoundsStart),R(this._mapBounds,this._mapBoundsStart),null!=this.graphic.geometry?this._sizeStart=Et(this._mapBoundsStart,this._zmax,this.graphic.geometry.spatialReference,this._graphicState.isDraped):this._sizeStart=null}_moveDragUpdateGeometry(){return t=>{if(null==this.inputState||"move"!==this.inputState.type)return t;const e=[];for(const s of this._editGeometryOperations.data.components)e.push(...s.vertices);const i="start"===t.action?bt.NEW_STEP:bt.ACCUMULATE_STEPS,a=this._editGeometryOperations.moveVertices(e,t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);return Bt(a,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_updateMoveTooltip(t,e){if(e===lt.XY||e===lt.XY_AXIS){const e=zt(t.mapStart,t.mapEnd,this._graphicState.isDraped?"on-the-ground":"absolute-height");null!=e&&null!=this._moveXYTooltipInfo&&(this._moveXYTooltipInfo.distance=e)}return t}_onResizeGrab({action:t,screenPoint:e}){if("start"!==t||!e)return;const i=this._calculatePickRay(e);G(this._displayBounds.plane,i,U.get())&&(this._updateOperationStartProperties(),this._displayBoundsMarginStart=this._displayBoundsMargin,this.inputState={type:"resize"})}_createResizeDragPipeline(t,e){return vt(t,((t,i,a)=>{null!=this.inputState&&(i.next((t=>("start"===t.action&&this.emit("graphic-scale-start",{graphic:this.graphic,xScale:1,yScale:1}),t))).next(st(this.view,this._displayBoundsStart.plane)).next((t=>({...t,handle:e}))).next(this._resizeDragRenderPlaneToFactors()).next(...this._preserveAspectRatio.createDragEventPipelineStep()).next(this._resizeDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":this.emit("graphic-scale",e);break;case"end":this.inputState=null,this.emit("graphic-scale-stop",e)}return t})),a.next((()=>{null!=this.inputState&&this.emit("graphic-scale-stop",{graphic:this.graphic,xScale:1,yScale:1}),this._cancel()})))}))}_resizeDragRenderPlaneToFactors(){return t=>{const e=this._displayBoundsStart,i=t.handle.direction,a=this._displayBoundsMargin,s=this._displayBoundsMarginStart,o=S(U.get(),e.origin);M(o,o,e.basis1,-i[0]),M(o,o,e.basis2,-i[1]);const r=b(U.get(),t.renderEnd,o),n=b(U.get(),t.renderStart,o),p=Y(t.handle),l=F(e),h=F(this._displayBounds)/l,c=(t,e)=>{if(0===t)return 1;let i=E(e),o=.5*t*x(e,r)/i;const l=o<0?-1:1;if(p){o+=(i-.5*t*x(e,n)/i)*l*h}const c=i<1.5*s?1:kt;return i=Math.max(i-s,kt),l>0&&(o-=a),l*Math.max(l*(o/i),c)};return{...t,factor1:c(i[0],e.basis1),factor2:c(i[1],e.basis2)}}}_resizeDragUpdateGeometry(){return t=>{const e=S(A(),this._mapBoundsStart.origin);M(e,e,this._mapBoundsStart.basis1,-t.handle.direction[0]),M(e,e,this._mapBoundsStart.basis2,-t.handle.direction[1]);const i=g(f(),this._mapBoundsStart.basis1[0],this._mapBoundsStart.basis1[1]);y(i,i);const a=[];for(const r of this._editGeometryOperations.data.components)a.push(...r.vertices);const s="start"===t.action?bt.NEW_STEP:bt.ACCUMULATE_STEPS,o=this._editGeometryOperations.scaleVertices(a,e,i,t.factor1,t.factor2,s,Tt.REPLACE);return R(this._mapBoundsStart,this._mapBounds),Bt(o,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_onRotateGrab({action:t,screenPoint:e}){if("start"!==t||!e)return;const i=q(this._displayBounds,this.view.renderCoordsHelper,W.HEADING,D()),a=this._calculatePickRay(e);G(i,a,U.get())&&(this._updateOperationStartProperties(),this.inputState={type:"rotate",rotatePlane:i})}_createRotateDragPipeline(t){return vt(t,((t,e,i)=>{const a=this.inputState;null!=a&&(e.next((t=>("start"===t.action&&this.emit("graphic-rotate-start",{graphic:this.graphic,angle:0}),t))).next(st(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,angle:o(t.rotateAngle)};switch(t.action){case"start":case"update":this.emit("graphic-rotate",e);break;case"end":this.inputState=null,this.emit("graphic-rotate-stop",e)}return t})),i.next((()=>{null!=this.inputState&&this.emit("graphic-rotate-stop",{graphic:this.graphic,angle:0}),this._cancel()})))}))}_rotateDragRenderPlaneToRotate(t){return e=>{const i=w(t.rotatePlane),a=it(e.renderStart,e.renderEnd,this._displayBounds.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdateGeometry(){return t=>{const e=S(A(),this._mapBoundsStart.origin),i=[];for(const o of this._editGeometryOperations.data.components)i.push(...o.vertices);const a="start"===t.action?bt.NEW_STEP:bt.ACCUMULATE_STEPS,s=this._editGeometryOperations.rotateVertices(i,e,t.rotateAngle,a,Tt.REPLACE);return R(this._mapBoundsStart,this._mapBounds),Bt(s,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_calculatePickRay(t){const e=P(),i=l(t);return gt(this.view.state.camera,i,e),T(e.direction,e.direction),e}_updateManipulators(){if(!this.visible)return;const t=J(this._displayBounds,I.get());K(this._rotateManipulator,t,this._displayBounds,this.view.renderCoordsHelper),this._updateZMoveHandle(this._moveZManipulator,t),this._resizeManipulators.forEach(((e,i)=>{Q(e,this._resizeHandles[i],t,this._displayBounds)}))}_updateZMoveHandle(t,e){const i=this._displayBounds,a={basis:i.basis1,direction:-1,position:b(U.get(),i.origin,i.basis1),edge:2},s=I.get();_(s,e,a.edge*Math.PI/2),s[12]=0,s[13]=0,s[14]=0,t.modelTransform=s,t.renderLocation=a.position}_cancel(){const t=this._editGeometryOperations.lastOperation;null!=t&&(this._editGeometryOperations.undo(),this.graphic.geometry=this._editGeometryOperations.data.geometry,Ot(t,this._mapBounds),this._updateDisplayBounds(),this.inputState=null)}get canUndo(){return this._editGeometryOperations.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this._editGeometryOperations.undo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Ot(t,this._mapBounds),this._updateDisplayBounds()}}get canRedo(){return this._editGeometryOperations.canRedo}redo(){if(this.canRedo){const t=this._editGeometryOperations.redo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Bt(t,this._mapBounds),this._updateDisplayBounds()}}get test(){return{resizeManipulators:this._resizeManipulators,rotateManipulator:this._rotateManipulator,moveZManipulator:this._moveZManipulator,tooltip:this._tooltip}}};t([d({constructOnly:!0,nonNullable:!0})],It.prototype,"view",void 0),t([d({constructOnly:!0,nonNullable:!0})],It.prototype,"graphic",void 0),t([d({constructOnly:!0,nonNullable:!0})],It.prototype,"enableZ",void 0),t([d()],It.prototype,"enableRotation",void 0),t([d()],It.prototype,"enableScaling",void 0),t([d({constructOnly:!0,type:jt})],It.prototype,"tooltipOptions",void 0),t([d()],It.prototype,"preserveAspectRatio",null),t([d()],It.prototype,"grabbing",void 0),t([d()],It.prototype,"inputState",void 0),t([d({readOnly:!0})],It.prototype,"type",void 0),t([d()],It.prototype,"_moveUnit",null),It=t([m("esri.views.3d.interactive.editingTools.graphicTransform3D.ExtentTransformTool")],It);const Zt="draped-elevation-changes",Ct=10,Ht=80,kt=1e-6;export{kt as EPSILON,It as ExtentTransformTool};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{cyclicalPI as e}from"../../../../../core/Cyclical.js";import a from"../../../../../core/Evented.js";import i from"../../../../../core/Handles.js";import{clamp as o,rad2deg as s}from"../../../../../core/mathUtils.js";import{destroyMaybe as n}from"../../../../../core/maybe.js";import{createAngle as r,createLength as l}from"../../../../../core/quantityUtils.js";import{when as c,initial as h,watch as p}from"../../../../../core/reactiveUtils.js";import{addFrameTask as d}from"../../../../../core/scheduling.js";import{createScreenPointArray as u}from"../../../../../core/screenUtils.js";import{d as g,E as m,m as _,k as f,e as D}from"../../../../../chunks/mat4.js";import{c as S}from"../../../../../chunks/mat4f64.js";import{s as M,g as v,l as y,a as w,c as b,e as T}from"../../../../../chunks/vec3.js";import{a as R,f as j}from"../../../../../chunks/vec3f64.js";import{fromPositionAndNormal as O,create as I,normal as k}from"../../../../../geometry/support/plane.js";import{wrap as A,distance2 as F}from"../../../../../geometry/support/ray.js";import{sv3d as P,sm4d as C}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as E}from"../../../../../support/elevationInfoUtils.js";import{Manipulator3D as U}from"../../Manipulator3D.js";import{calculateInputRotationTransform as L}from"../../manipulatorUtils.js";import{RenderObject as z}from"../../RenderObject.js";import{screenToRenderPlane as x}from"../dragEventPipeline3D.js";import{ManipulatorType as N}from"../ManipulatorType.js";import{getSettings as H}from"../settings.js";import{RING_INDICATOR_DELAY_MS as V,ROTATE_INDICATOR_DIRECTION_BUFFER as q,SCALE_INDICATOR_DIRECTION_BUFFER as B,ROTATE_INDICATOR_ARROW_PLACEMENT_PERCENTAGE as G,RING_THICKNESS as J,DRAG_THRESHOLD_PX as K,RING_RADIUS as Q,INNER_INDICATOR_RADIUS as W,OUTER_INDICATOR_RADIUS as X,RING_HEIGHT as Y,ROTATE_INDICATOR_ARROW_TIP_RADIUS as Z,ROTATE_INDICATOR_ARROW_TIP_LENGTH as $,SCALE_INDICATOR_OFFSET1 as tt,SCALE_INDICATOR_OFFSET2 as et,INDICATOR_THICKNESS as at,GEOMETRY_SEGMENTS as it,ROTATE_INDICATOR_ARC_LENGTH as ot,RING_RESET_ANIMATION_SPEED_FACTOR as st,SCALE_INDICATOR_ARC_LENGTH as nt}from"../manipulations/config.js";import{CullFaceOptions as rt}from"../../../webgl-engine/lib/basicInterfaces.js";import{createExtrudedTriangle as lt,transformInPlace as ct,createPathExtrusionGeometry as ht}from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as pt}from"../../../webgl-engine/lib/Material.js";import{ColorMaterial as dt}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as ut}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateCustomFlags as gt,ManipulatorStateFlags as mt}from"../../../../interactive/interfaces.js";import{Tooltip as _t}from"../../../../interactive/tooltip/Tooltip.js";import{TransformRotateTooltipInfo as ft,TransformScaleTooltipInfo as Dt,TransformAbsoluteTooltipInfo as St}from"../../../../interactive/tooltip/TransformTooltipInfos.js";var Mt,vt;!function(t){t.ScaleIn=gt.Custom2,t.ScaleOut=gt.Custom3,t.RotateLeft=gt.Custom4,t.RotateRight=gt.Custom5,t.Unlocked=gt.Custom7,t.DelayedFocused=gt.Custom8,t.TouchInput=gt.Custom12}(Mt||(Mt={}));class yt{get angle(){return this._adapter.angle}get scale(){return this._adapter.scale}set location(t){this._ringManipulator.location=t}set elevationAlignedLocation(t){this._ringManipulator.elevationAlignedLocation=t}get grabbing(){return this._ringManipulator.grabbing}set interactive(t){this._ringManipulator.interactive=t}constructor({adapter:t,tooltipOptions:e,mode:o,tool:s}){this._mode=null,this._handles=new i,this._scaleRotateDragData=null,this._activeAnimation=null,this._ringIndicatorDelayMs=V,this.events=new a,this.getFocused=()=>this._ringManipulator.focused,this.getScale=()=>"scale"===this._scaleRotateDragData?.mode?this._adapter.scale:1,this.tool=s,this._mode=o,this._adapter=t,this._tooltipOptions=e,this._tooltip=new _t({view:s.view}),this._createManipulator(),this._updateDragState(),this._updateManipulatorTransform(),this._handles.add(c((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),h))}destroy(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=null,this._handles=n(this._handles),this.tool.manipulators.remove(this._ringManipulator),this._ringManipulator=null,this._tooltip=n(this._tooltip)}startAnimation(t){this.cancelActiveAnimation(),t.start();const e=d({update:({deltaTime:e})=>{t.update(e)&&this.cancelActiveAnimation()}});this._activeAnimation={...t,frameTask:e}}cancelActiveAnimation(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=n(this._activeAnimation)}forEachManipulator(t){t(this._ringManipulator,N.SCALE_ROTATE)}_createManipulator(){const t=this._createRingManipulator();this._ringManipulator=t,this.tool.manipulators.add(t);const a=this.tool.graphicState.graphic,i=ut(t,((t,i,n)=>{this._scaleRotateDragData=null;const r=this._adapter.startInteraction(),l={mode:"none",origin:R(t.renderLocation),initialAngle:this._adapter.angle,angle:0,angleDir:0,scaleDir:0};this._scaleRotateDragData=l,this._updateDragState();const c=P.get();this.tool.view.renderCoordsHelper.worldUpAtPosition(t.renderLocation,c),i.next(x(this.tool.view,O(t.renderLocation,c,I()))).next((t=>{const i=k(t.plane),n=L(t.renderStart,t.renderEnd,l.origin,i),c=e.shortestSignedDiff(l.angle,n);l.angleDir=o(l.angleDir+c,-q,q),l.angle=n;const h=wt(l,t),p=h-this._adapter.scale;if(l.scaleDir=o(l.scaleDir+p,-B,B),this._onScaleChanged(),"none"===l.mode){const e=this._mode||bt(t,t.plane,l.origin,this.tool.view.state.camera);if(null!=e){switch(e){case"rotate":this.tool.emit("graphic-rotate-start",{graphic:a,angle:0}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()});break;case"scale":this.tool.emit("graphic-scale-start",{graphic:a,xScale:1,yScale:1}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()})}l.mode=e}}switch(l.mode){case"rotate":r.state.angle=l.initialAngle+n;break;case"scale":r.state.scale=h,this._onScaleChanged()}switch(this._updateDragState(),this._updateManipulatorTransform(),t.action){case"start":case"update":switch(l.mode){case"rotate":this.tool.emit("graphic-rotate",{graphic:a,angle:s(l.angle)});break;case"scale":this.tool.emit("graphic-scale",{graphic:a,xScale:h,yScale:h})}break;case"end":switch(l.mode){case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:s(l.angle)});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:h,yScale:h})}}return"end"===t.action&&(this.startAnimation(Rt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState(),r.done()),t})).next(this._updateTooltipPipelineStep(l)),n.next((()=>{if(r.cancel(),null!=this._scaleRotateDragData){switch(this._scaleRotateDragData.mode){case"none":break;case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:0});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:1,yScale:1})}this.startAnimation(Rt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState()}this._updateFocusTooltip()}))}));this._handles.add([i,t.events.on("focus-changed",(t=>{"focus"===t.action?this.startAnimation(jt(this,(()=>this._updateDelayedFocusedState()),{delayMs:this._ringIndicatorDelayMs})):this._updateDelayedFocusedState()})),t.events.on("immediate-click",(t=>{t.stopPropagation()})),p((()=>this.tool.graphicState?.displaying),(t=>this._ringManipulator.available=t),h)])}_updateTooltipPipelineStep(t){return e=>{const a=this._tooltipOptions;if(!a.enabled)return e;if("end"===e.action)return this._updateFocusTooltip(),e;const i=this._tooltip,o=this._tooltipOptions.visualVariables;switch(t.mode){case"scale":{const{size:t,scale:e}=this._adapter,s=o?.size;i.info=new Dt({tooltipOptions:a,scale:{value:e},size:null!=t?l(t,"meters"):void 0,sizePrecision:Ot(s?.valueType),sizeUnit:s?.unit});break}case"rotate":{const{orientationClockwise:t,relativeAngleClockwise:e}=this._adapter,s=o?.rotation,n=Ot(s?.valueType);i.info=new ft({tooltipOptions:a,rotation:null!=e?r(e,"radians","geographic"):void 0,rotationPrecision:n,rotationType:s?.rotationType??"geographic",orientation:null!=t?r(t,"radians","geographic"):void 0,orientationPrecision:n})}}return e}}_updateFocusTooltip(){if(!this._tooltipOptions.enabled)return;if(this.getFocused()){const t=this._tooltipOptions.visualVariables,e=t?.rotation,a=t?.size,i=this._mode,{size:o,orientationClockwise:s}=this._adapter,n=null!=s&&(null==i||"rotate"===i),c=null!=o&&(null==i||"scale"===i);this._tooltip.info=new St({tooltipOptions:this._tooltipOptions,orientation:n?r(s,"radians","geographic"):void 0,orientationPrecision:Ot(e?.valueType),rotationType:e?.rotationType??"geographic",size:c?l(o,"meters"):void 0,sizeUnit:a?.unit,sizePrecision:Ot(a?.valueType)})}else this._tooltip.clear()}_onScaleChanged(){this.events.emit("scale-changed"),this._updateManipulatorTransform()}_updateDelayedFocusedState(){this._ringManipulator.updateStateEnabled(Mt.DelayedFocused,this.getFocused()),this._updateFocusTooltip()}_updateDragState(){if(this._ringManipulator.updateStateEnabled(Mt.Unlocked,!(null!=this._scaleRotateDragData&&"none"!==this._scaleRotateDragData?.mode)),null!=this._scaleRotateDragData)switch(this._scaleRotateDragData.mode){case"rotate":this._ringManipulator.updateStateEnabled(Mt.ScaleIn|Mt.ScaleOut,!1),this._ringManipulator.updateStateEnabled(Mt.RotateLeft,this._scaleRotateDragData.angleDir<0),this._ringManipulator.updateStateEnabled(Mt.RotateRight,this._scaleRotateDragData.angleDir>=0);break;case"scale":this._ringManipulator.updateStateEnabled(Mt.RotateLeft|Mt.RotateRight,!1),this._ringManipulator.updateStateEnabled(Mt.ScaleIn,this._scaleRotateDragData.scaleDir<0),this._ringManipulator.updateStateEnabled(Mt.ScaleOut,this._scaleRotateDragData.scaleDir>=0)}else this._ringManipulator.updateStateEnabled(Mt.ScaleIn|Mt.ScaleOut|Mt.RotateLeft|Mt.RotateRight,!1)}_updateManipulatorTransform(){const t=g(C.get(),this._adapter.angle,j(0,0,1));if(null==t)return;const e=this.getScale(),a=m(C.get(),M(P.get(),e,e,e));this._ringManipulator.modelTransform=_(C.get(),a,t)}_createRingManipulator(){const t=(t,e,a)=>{const i=[],o=Math.ceil(it*(e-t)/(2*Math.PI));for(let s=0;s<o+1;s++){const n=t+s*(e-t)/o;i.push(j(a*Math.cos(n),a*Math.sin(n),0))}return i},e=e=>t(0,2*Math.PI,e),a=t=>[[-t/2,0],[t/2,0],[t/2,Y/2],[-t/2,Y/2]],i=this._createMaterial(1),o=(t,e,o=i)=>ht(o,a(e),t,[],[],!1),s=e(Q),n=o(s,J),r={left:new Array,right:new Array},l=[];for(let R=0;R<2;R++){const e=R*Math.PI-Math.PI/4,a=Math.PI/2-ot,s=e+a,n=e+Math.PI/2-a,c=t(s,n,W),h=o(c,at);l.push(c),l.push(t(s,n,X-J/2)),r.left.push(h),r.right.push(h.instantiate());for(let t=0;t<2;t++){const e=0===t,a=S();if(e){f(a,a,[1,-1,1]),D(a,a,-s,[0,0,1]);const t=Math.round(G*(c.length-1));a[12]=c[t][0],a[13]=c[t][1],a[14]=c[t][2]}else{D(a,a,n,[0,0,1]);const t=Math.round((1-G)*(c.length-1));a[12]=c[t][0],a[13]=c[t][1],a[14]=c[t][2]}const o=lt(i,$,0,Z,Y);ct(o,a),(e?r.left:r.right).push(o)}}const c=[];for(let f=0;f<2;f++){const e=f*Math.PI-Math.PI/4,a=Math.PI/2-nt,i=e+a,s=e+Math.PI/2-a,n=t(i,s,X);c.push(o(n,at))}const h=this._createMaterial(.66),p=this._createMaterial(.5),d=this._createMaterial(.33),u=e(Q+tt),g=e(Q+et),m=o(u,at,h),_=o(g,at,d),M=e(Q-tt),v=e(Q-et),y=o(M,at,h),w=o(v,at,d);let b=[new z(n,Mt.DelayedFocused),new z(n.instantiate({material:p}),mt.None)];this._mode&&"scale"!==this._mode||(b=b.concat([...c.map((t=>new z(t,Mt.DelayedFocused|Mt.Unlocked))),new z(m,Mt.DelayedFocused|Mt.ScaleIn),new z(_,Mt.DelayedFocused|Mt.ScaleIn),new z(y,Mt.DelayedFocused|Mt.ScaleOut),new z(w,Mt.DelayedFocused|Mt.ScaleOut)])),this._mode&&"rotate"!==this._mode||(b=b.concat([...r.right.map((t=>new z(t.instantiate(),Mt.DelayedFocused|Mt.Unlocked))),...r.left.map((t=>new z(t,Mt.DelayedFocused|Mt.RotateLeft))),...r.right.map((t=>new z(t,Mt.DelayedFocused|Mt.RotateRight)))]));const T=[s,...l];return new U({view:this.tool.view,renderObjects:b,autoScaleRenderObjects:!1,worldOriented:!0,radius:J,focusMultiplier:1,touchMultiplier:1.5,elevationInfo:E(this.tool.graphicState.graphic),collisionType:{type:"ribbon",paths:T,direction:j(0,0,1)}})}_createMaterial(e){const a=H(this.tool.view.effectiveTheme).colors.accent.clone();return a.a=e,new dt({color:t(a),transparent:1!==e,cullFace:rt.Back,renderOccluded:pt.Transparent,isDecoration:!0})}get test(){return{ringManipulator:this._ringManipulator,setRingIndicatorDelayMs:t=>this._ringIndicatorDelayMs=t,tooltip:this._tooltip}}}function wt(t,e){const a=v(P.get(),e.renderStart,t.origin),i=v(P.get(),e.renderEnd,t.origin),o=y(a),s=y(i);return 0===o?0:s/o}function bt(t,e,a,i){const{renderStart:o,renderEnd:s}=t,n=Tt(o,i,P.get()),r=Tt(s,i,P.get());if(w(n,r)<K*K)return null;const l=v(P.get(),o,a),c=b(P.get(),l,k(e)),h=o,p=T(P.get(),h,c),d=Tt(a,i,P.get()),u=n,g=Tt(p,i,P.get()),m=v(P.get(),g,u),_=v(P.get(),n,d),f=A(u,m),D=A(d,_);return F(f,r)<F(D,r)?"rotate":"scale"}function Tt(t,e,a){return e.projectToScreen(t,It),M(a,It[0],It[1],0)}function Rt(t,e){let a=null,i=1;const o=()=>i;return{start:()=>{i=t.getScale(),a=t.getScale,t.getScale=o,e()},update:t=>(i+=((i+1)/2-i)*Math.min(t*st,1),e(),Math.abs(i-1)<.01?vt.STOP:vt.CONTINUE),destroy:()=>{a&&(t.getScale=a),e()}}}function jt(t,e,a){let i=0,o=null;const s=()=>!1;return{start:()=>{o=t.getFocused,t.getFocused=s,i=0,e()},update:t=>(i+=t,!o?.()||i>=a.delayMs?vt.STOP:vt.CONTINUE),destroy:()=>{o&&(t.getFocused=o),e()}}}function Ot(t){switch(t){case"integer":case"long":return 0;default:return null}}!function(t){t[t.CONTINUE=0]="CONTINUE",t[t.STOP=1]="STOP"}(vt||(vt={}));const It=u();export{yt as GraphicScaleRotateTransform};
|
|
5
|
+
import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{cyclicalPI as e}from"../../../../../core/Cyclical.js";import a from"../../../../../core/Evented.js";import i from"../../../../../core/Handles.js";import{clamp as o,rad2deg as s}from"../../../../../core/mathUtils.js";import{destroyMaybe as n}from"../../../../../core/maybe.js";import{createAngle as r,createLength as l}from"../../../../../core/quantityUtils.js";import{when as c,initial as h,watch as p}from"../../../../../core/reactiveUtils.js";import{addFrameTask as d}from"../../../../../core/scheduling.js";import{createScreenPointArray as u}from"../../../../../core/screenUtils.js";import{c as g,E as m,m as _,b as f,k as D}from"../../../../../chunks/mat4.js";import{a as S}from"../../../../../chunks/mat4f64.js";import{s as M,f as v,l as y,a as w,b,g as T}from"../../../../../chunks/vec3.js";import{g as R,f as j}from"../../../../../chunks/vec3f64.js";import{fromPositionAndNormal as O,create as I,normal as k}from"../../../../../geometry/support/plane.js";import{wrap as A,distance2 as F}from"../../../../../geometry/support/ray.js";import{sv3d as P,sm4d as C}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as E}from"../../../../../support/elevationInfoUtils.js";import{Manipulator3D as U}from"../../Manipulator3D.js";import{calculateInputRotationTransform as L}from"../../manipulatorUtils.js";import{RenderObject as z}from"../../RenderObject.js";import{screenToRenderPlane as x}from"../dragEventPipeline3D.js";import{ManipulatorType as N}from"../ManipulatorType.js";import{getSettings as H}from"../settings.js";import{RING_INDICATOR_DELAY_MS as V,ROTATE_INDICATOR_DIRECTION_BUFFER as q,SCALE_INDICATOR_DIRECTION_BUFFER as B,ROTATE_INDICATOR_ARROW_PLACEMENT_PERCENTAGE as G,RING_THICKNESS as J,DRAG_THRESHOLD_PX as K,RING_RADIUS as Q,INNER_INDICATOR_RADIUS as W,OUTER_INDICATOR_RADIUS as X,RING_HEIGHT as Y,ROTATE_INDICATOR_ARROW_TIP_RADIUS as Z,ROTATE_INDICATOR_ARROW_TIP_LENGTH as $,SCALE_INDICATOR_OFFSET1 as tt,SCALE_INDICATOR_OFFSET2 as et,INDICATOR_THICKNESS as at,GEOMETRY_SEGMENTS as it,ROTATE_INDICATOR_ARC_LENGTH as ot,RING_RESET_ANIMATION_SPEED_FACTOR as st,SCALE_INDICATOR_ARC_LENGTH as nt}from"../manipulations/config.js";import{CullFaceOptions as rt}from"../../../webgl-engine/lib/basicInterfaces.js";import{createExtrudedTriangle as lt,transformInPlace as ct,createPathExtrusionGeometry as ht}from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as pt}from"../../../webgl-engine/lib/Material.js";import{ColorMaterial as dt}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as ut}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateCustomFlags as gt,ManipulatorStateFlags as mt}from"../../../../interactive/interfaces.js";import{Tooltip as _t}from"../../../../interactive/tooltip/Tooltip.js";import{TransformRotateTooltipInfo as ft,TransformScaleTooltipInfo as Dt,TransformAbsoluteTooltipInfo as St}from"../../../../interactive/tooltip/TransformTooltipInfos.js";var Mt,vt;!function(t){t.ScaleIn=gt.Custom2,t.ScaleOut=gt.Custom3,t.RotateLeft=gt.Custom4,t.RotateRight=gt.Custom5,t.Unlocked=gt.Custom7,t.DelayedFocused=gt.Custom8,t.TouchInput=gt.Custom12}(Mt||(Mt={}));class yt{get angle(){return this._adapter.angle}get scale(){return this._adapter.scale}set location(t){this._ringManipulator.location=t}set elevationAlignedLocation(t){this._ringManipulator.elevationAlignedLocation=t}get grabbing(){return this._ringManipulator.grabbing}set interactive(t){this._ringManipulator.interactive=t}constructor({adapter:t,tooltipOptions:e,mode:o,tool:s}){this._mode=null,this._handles=new i,this._scaleRotateDragData=null,this._activeAnimation=null,this._ringIndicatorDelayMs=V,this.events=new a,this.getFocused=()=>this._ringManipulator.focused,this.getScale=()=>"scale"===this._scaleRotateDragData?.mode?this._adapter.scale:1,this.tool=s,this._mode=o,this._adapter=t,this._tooltipOptions=e,this._tooltip=new _t({view:s.view}),this._createManipulator(),this._updateDragState(),this._updateManipulatorTransform(),this._handles.add(c((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),h))}destroy(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=null,this._handles=n(this._handles),this.tool.manipulators.remove(this._ringManipulator),this._ringManipulator=null,this._tooltip=n(this._tooltip)}startAnimation(t){this.cancelActiveAnimation(),t.start();const e=d({update:({deltaTime:e})=>{t.update(e)&&this.cancelActiveAnimation()}});this._activeAnimation={...t,frameTask:e}}cancelActiveAnimation(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=n(this._activeAnimation)}forEachManipulator(t){t(this._ringManipulator,N.SCALE_ROTATE)}_createManipulator(){const t=this._createRingManipulator();this._ringManipulator=t,this.tool.manipulators.add(t);const a=this.tool.graphicState.graphic,i=ut(t,((t,i,n)=>{this._scaleRotateDragData=null;const r=this._adapter.startInteraction(),l={mode:"none",origin:R(t.renderLocation),initialAngle:this._adapter.angle,angle:0,angleDir:0,scaleDir:0};this._scaleRotateDragData=l,this._updateDragState();const c=P.get();this.tool.view.renderCoordsHelper.worldUpAtPosition(t.renderLocation,c),i.next(x(this.tool.view,O(t.renderLocation,c,I()))).next((t=>{const i=k(t.plane),n=L(t.renderStart,t.renderEnd,l.origin,i),c=e.shortestSignedDiff(l.angle,n);l.angleDir=o(l.angleDir+c,-q,q),l.angle=n;const h=wt(l,t),p=h-this._adapter.scale;if(l.scaleDir=o(l.scaleDir+p,-B,B),this._onScaleChanged(),"none"===l.mode){const e=this._mode||bt(t,t.plane,l.origin,this.tool.view.state.camera);if(null!=e){switch(e){case"rotate":this.tool.emit("graphic-rotate-start",{graphic:a,angle:0}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()});break;case"scale":this.tool.emit("graphic-scale-start",{graphic:a,xScale:1,yScale:1}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()})}l.mode=e}}switch(l.mode){case"rotate":r.state.angle=l.initialAngle+n;break;case"scale":r.state.scale=h,this._onScaleChanged()}switch(this._updateDragState(),this._updateManipulatorTransform(),t.action){case"start":case"update":switch(l.mode){case"rotate":this.tool.emit("graphic-rotate",{graphic:a,angle:s(l.angle)});break;case"scale":this.tool.emit("graphic-scale",{graphic:a,xScale:h,yScale:h})}break;case"end":switch(l.mode){case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:s(l.angle)});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:h,yScale:h})}}return"end"===t.action&&(this.startAnimation(Rt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState(),r.done()),t})).next(this._updateTooltipPipelineStep(l)),n.next((()=>{if(r.cancel(),null!=this._scaleRotateDragData){switch(this._scaleRotateDragData.mode){case"none":break;case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:0});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:1,yScale:1})}this.startAnimation(Rt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState()}this._updateFocusTooltip()}))}));this._handles.add([i,t.events.on("focus-changed",(t=>{"focus"===t.action?this.startAnimation(jt(this,(()=>this._updateDelayedFocusedState()),{delayMs:this._ringIndicatorDelayMs})):this._updateDelayedFocusedState()})),t.events.on("immediate-click",(t=>{t.stopPropagation()})),p((()=>this.tool.graphicState?.displaying),(t=>this._ringManipulator.available=t),h)])}_updateTooltipPipelineStep(t){return e=>{const a=this._tooltipOptions;if(!a.enabled)return e;if("end"===e.action)return this._updateFocusTooltip(),e;const i=this._tooltip,o=this._tooltipOptions.visualVariables;switch(t.mode){case"scale":{const{size:t,scale:e}=this._adapter,s=o?.size;i.info=new Dt({tooltipOptions:a,scale:{value:e},size:null!=t?l(t,"meters"):void 0,sizePrecision:Ot(s?.valueType),sizeUnit:s?.unit});break}case"rotate":{const{orientationClockwise:t,relativeAngleClockwise:e}=this._adapter,s=o?.rotation,n=Ot(s?.valueType);i.info=new ft({tooltipOptions:a,rotation:null!=e?r(e,"radians","geographic"):void 0,rotationPrecision:n,rotationType:s?.rotationType??"geographic",orientation:null!=t?r(t,"radians","geographic"):void 0,orientationPrecision:n})}}return e}}_updateFocusTooltip(){if(!this._tooltipOptions.enabled)return;if(this.getFocused()){const t=this._tooltipOptions.visualVariables,e=t?.rotation,a=t?.size,i=this._mode,{size:o,orientationClockwise:s}=this._adapter,n=null!=s&&(null==i||"rotate"===i),c=null!=o&&(null==i||"scale"===i);this._tooltip.info=new St({tooltipOptions:this._tooltipOptions,orientation:n?r(s,"radians","geographic"):void 0,orientationPrecision:Ot(e?.valueType),rotationType:e?.rotationType??"geographic",size:c?l(o,"meters"):void 0,sizeUnit:a?.unit,sizePrecision:Ot(a?.valueType)})}else this._tooltip.clear()}_onScaleChanged(){this.events.emit("scale-changed"),this._updateManipulatorTransform()}_updateDelayedFocusedState(){this._ringManipulator.updateStateEnabled(Mt.DelayedFocused,this.getFocused()),this._updateFocusTooltip()}_updateDragState(){if(this._ringManipulator.updateStateEnabled(Mt.Unlocked,!(null!=this._scaleRotateDragData&&"none"!==this._scaleRotateDragData?.mode)),null!=this._scaleRotateDragData)switch(this._scaleRotateDragData.mode){case"rotate":this._ringManipulator.updateStateEnabled(Mt.ScaleIn|Mt.ScaleOut,!1),this._ringManipulator.updateStateEnabled(Mt.RotateLeft,this._scaleRotateDragData.angleDir<0),this._ringManipulator.updateStateEnabled(Mt.RotateRight,this._scaleRotateDragData.angleDir>=0);break;case"scale":this._ringManipulator.updateStateEnabled(Mt.RotateLeft|Mt.RotateRight,!1),this._ringManipulator.updateStateEnabled(Mt.ScaleIn,this._scaleRotateDragData.scaleDir<0),this._ringManipulator.updateStateEnabled(Mt.ScaleOut,this._scaleRotateDragData.scaleDir>=0)}else this._ringManipulator.updateStateEnabled(Mt.ScaleIn|Mt.ScaleOut|Mt.RotateLeft|Mt.RotateRight,!1)}_updateManipulatorTransform(){const t=g(C.get(),this._adapter.angle,j(0,0,1));if(null==t)return;const e=this.getScale(),a=m(C.get(),M(P.get(),e,e,e));this._ringManipulator.modelTransform=_(C.get(),a,t)}_createRingManipulator(){const t=(t,e,a)=>{const i=[],o=Math.ceil(it*(e-t)/(2*Math.PI));for(let s=0;s<o+1;s++){const n=t+s*(e-t)/o;i.push(j(a*Math.cos(n),a*Math.sin(n),0))}return i},e=e=>t(0,2*Math.PI,e),a=t=>[[-t/2,0],[t/2,0],[t/2,Y/2],[-t/2,Y/2]],i=this._createMaterial(1),o=(t,e,o=i)=>ht(o,a(e),t,[],[],!1),s=e(Q),n=o(s,J),r={left:new Array,right:new Array},l=[];for(let R=0;R<2;R++){const e=R*Math.PI-Math.PI/4,a=Math.PI/2-ot,s=e+a,n=e+Math.PI/2-a,c=t(s,n,W),h=o(c,at);l.push(c),l.push(t(s,n,X-J/2)),r.left.push(h),r.right.push(h.instantiate());for(let t=0;t<2;t++){const e=0===t,a=S();if(e){f(a,a,[1,-1,1]),D(a,a,-s,[0,0,1]);const t=Math.round(G*(c.length-1));a[12]=c[t][0],a[13]=c[t][1],a[14]=c[t][2]}else{D(a,a,n,[0,0,1]);const t=Math.round((1-G)*(c.length-1));a[12]=c[t][0],a[13]=c[t][1],a[14]=c[t][2]}const o=lt(i,$,0,Z,Y);ct(o,a),(e?r.left:r.right).push(o)}}const c=[];for(let f=0;f<2;f++){const e=f*Math.PI-Math.PI/4,a=Math.PI/2-nt,i=e+a,s=e+Math.PI/2-a,n=t(i,s,X);c.push(o(n,at))}const h=this._createMaterial(.66),p=this._createMaterial(.5),d=this._createMaterial(.33),u=e(Q+tt),g=e(Q+et),m=o(u,at,h),_=o(g,at,d),M=e(Q-tt),v=e(Q-et),y=o(M,at,h),w=o(v,at,d);let b=[new z(n,Mt.DelayedFocused),new z(n.instantiate({material:p}),mt.None)];this._mode&&"scale"!==this._mode||(b=b.concat([...c.map((t=>new z(t,Mt.DelayedFocused|Mt.Unlocked))),new z(m,Mt.DelayedFocused|Mt.ScaleIn),new z(_,Mt.DelayedFocused|Mt.ScaleIn),new z(y,Mt.DelayedFocused|Mt.ScaleOut),new z(w,Mt.DelayedFocused|Mt.ScaleOut)])),this._mode&&"rotate"!==this._mode||(b=b.concat([...r.right.map((t=>new z(t.instantiate(),Mt.DelayedFocused|Mt.Unlocked))),...r.left.map((t=>new z(t,Mt.DelayedFocused|Mt.RotateLeft))),...r.right.map((t=>new z(t,Mt.DelayedFocused|Mt.RotateRight)))]));const T=[s,...l];return new U({view:this.tool.view,renderObjects:b,autoScaleRenderObjects:!1,worldOriented:!0,radius:J,focusMultiplier:1,touchMultiplier:1.5,elevationInfo:E(this.tool.graphicState.graphic),collisionType:{type:"ribbon",paths:T,direction:j(0,0,1)}})}_createMaterial(e){const a=H(this.tool.view.effectiveTheme).colors.accent.clone();return a.a=e,new dt({color:t(a),transparent:1!==e,cullFace:rt.Back,renderOccluded:pt.Transparent,isDecoration:!0})}get test(){return{ringManipulator:this._ringManipulator,setRingIndicatorDelayMs:t=>this._ringIndicatorDelayMs=t,tooltip:this._tooltip}}}function wt(t,e){const a=v(P.get(),e.renderStart,t.origin),i=v(P.get(),e.renderEnd,t.origin),o=y(a),s=y(i);return 0===o?0:s/o}function bt(t,e,a,i){const{renderStart:o,renderEnd:s}=t,n=Tt(o,i,P.get()),r=Tt(s,i,P.get());if(w(n,r)<K*K)return null;const l=v(P.get(),o,a),c=b(P.get(),l,k(e)),h=o,p=T(P.get(),h,c),d=Tt(a,i,P.get()),u=n,g=Tt(p,i,P.get()),m=v(P.get(),g,u),_=v(P.get(),n,d),f=A(u,m),D=A(d,_);return F(f,r)<F(D,r)?"rotate":"scale"}function Tt(t,e,a){return e.projectToScreen(t,It),M(a,It[0],It[1],0)}function Rt(t,e){let a=null,i=1;const o=()=>i;return{start:()=>{i=t.getScale(),a=t.getScale,t.getScale=o,e()},update:t=>(i+=((i+1)/2-i)*Math.min(t*st,1),e(),Math.abs(i-1)<.01?vt.STOP:vt.CONTINUE),destroy:()=>{a&&(t.getScale=a),e()}}}function jt(t,e,a){let i=0,o=null;const s=()=>!1;return{start:()=>{o=t.getFocused,t.getFocused=s,i=0,e()},update:t=>(i+=t,!o?.()||i>=a.delayMs?vt.STOP:vt.CONTINUE),destroy:()=>{o&&(t.getFocused=o),e()}}}function Ot(t){switch(t){case"integer":case"long":return 0;default:return null}}!function(t){t[t.CONTINUE=0]="CONTINUE",t[t.STOP=1]="STOP"}(vt||(vt={}));const It=u();export{yt as GraphicScaleRotateTransform};
|