@arcgis/core 6.0.0-next.27 → 6.0.0-next.28
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/Map.d.ts +6 -0
- package/analysis/AreaMeasurementAnalysis.d.ts +4 -2
- package/analysis/DirectLineMeasurementAnalysis.d.ts +8 -4
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{0bd04bcd4b2710838d48.js → 03f33cb78b5405ab7e23.js} +1 -1
- package/assets/esri/core/workers/chunks/{7c75a8ee266c36baa902.js → 5eec1c1162779574f46e.js} +1 -1
- package/assets/esri/core/workers/chunks/{9dd1fc56eb1ea6eb705e.js → 76e27e36050a3dd9d249.js} +1 -1
- package/assets/esri/core/workers/chunks/76f877e2d2493d56afab.js +1 -0
- package/assets/esri/core/workers/chunks/{00580a68835aac653038.js → 9c4961213ac6ec283dd9.js} +5 -5
- package/assets/esri/core/workers/chunks/{13c64087be3b2985a21b.js → dbda982485d3fe26c729.js} +1 -1
- package/assets/esri/core/workers/chunks/dc7aa0a1eb6c6e361f9f.js +1 -0
- package/chunks/BlendLayers.glsl.js +1 -1
- package/chunks/Component.glsl.js +9 -12
- package/chunks/GaussianSplat.glsl.js +65 -21
- package/chunks/GaussianSplatDepth.glsl.js +45 -4
- package/chunks/GaussianSplatShadow.glsl.js +73 -19
- package/chunks/GlobalIllumination.glsl.js +2 -17
- package/chunks/LineMarker.glsl.js +32 -31
- package/chunks/OITAddEmission.glsl.js +1 -1
- package/chunks/RasterColorizer.glsl.js +1 -1
- package/chunks/RibbonLine.glsl.js +34 -34
- package/chunks/Terrain.glsl.js +3 -4
- package/chunks/Water.glsl.js +22 -23
- package/config.js +1 -1
- package/form/elements/inputs/DynamicChoiceInput.d.ts +2 -2
- package/geometry/operators/containsOperator.d.ts +1 -1
- package/geometry/operators/densifyOperator.d.ts +1 -1
- package/geometry/operators/differenceOperator.d.ts +6 -4
- package/geometry/operators/distanceOperator.d.ts +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +8 -8
- package/geometry/operators/graphicBufferOperator.d.ts +6 -6
- package/geometry/operators/integrateOperator.d.ts +2 -2
- package/geometry/operators/intersectsOperator.d.ts +3 -3
- package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
- package/geometry/operators/locateBetweenOperator.d.ts +2 -2
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
- package/geometry/operators/polygonSlicerOperator.d.ts +2 -2
- package/geometry/operators/projectOperator.d.ts +2 -2
- package/geometry/operators/proximityOperator.d.ts +15 -15
- package/geometry/operators/shapePreservingProjectOperator.d.ts +2 -2
- package/geometry/operators/simplifyOperator.d.ts +2 -2
- package/geometry/operators/support/GeographicTransformationStep.d.ts +3 -3
- package/geometry/operators/support/Transformation.d.ts +8 -8
- package/geometry/operators/support/geographicTransformationUtils.d.ts +3 -3
- package/geometry/operators/symmetricDifferenceOperator.d.ts +2 -2
- package/geometry/operators/withinOperator.d.ts +3 -3
- package/kernel.js +1 -1
- package/layers/GeospatialPDFLayer.d.ts +2 -2
- package/layers/ParquetLayer.d.ts +1 -1
- package/package.json +2 -2
- package/popup/FeaturesModel.js +1 -1
- package/popup/support/featureUtils.js +1 -1
- package/rest/featureService/FeatureService.d.ts +0 -5
- package/rest/networks/support/TraceLocation.d.ts +2 -1
- package/rest/networks/support/TraceResult.d.ts +0 -4
- package/rest/support/OutDistance.d.ts +0 -1
- package/smartMapping/statistics/histogramForTimeSeries.js +1 -1
- package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +1 -1
- package/support/BasemapStyle.d.ts +2 -2
- package/symbols/cim/types.d.ts +7 -9
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/support/projectionUtils.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +15 -2
- package/views/3d/environment/VirtualLighting.d.ts +15 -2
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/ground/GroundMouseWheelMove.js +2 -0
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/navigation/Navigation3D.js +1 -1
- package/views/3d/state/controllers/GroundMouseWheelController.js +2 -0
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/terrain/BlendLayers.glsl.js +1 -1
- package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js +7 -8
- package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +3 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/forwardLocalUp.glsl.js +6 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/getLocalUp.glsl.js +4 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/{TileBackground.glsl.js → blendLayers.glsl.js} +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +61 -108
- package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawScreenTool.js +1 -1
- package/views/input/types.d.ts +2 -4
- package/views/interactive/options/LabelOptions.d.ts +5 -5
- package/views/interactive/options/SnappingOptions.d.ts +2 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +0 -1
- package/widgets/Editor/VisibleElements.d.ts +4 -0
- package/widgets/Editor.d.ts +2 -0
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Search/LayerSearchSource.d.ts +1 -1
- package/widgets/Sketch/VisibleElements.d.ts +4 -0
- package/widgets/Sketch.d.ts +2 -0
- package/assets/esri/core/workers/chunks/c29091fe157564cffcf7.js +0 -1
- package/assets/esri/core/workers/chunks/c8eae00b0ec87d8b2ff3.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../../../../core/Error.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/lightingUniforms.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/readShadow.glsl.js";import"../core/shaderLibrary/shading/WaterColor.glsl.js";import"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../shaders/OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../chunks/Water.glsl.js";
|
|
2
|
+
import"../../../../core/Error.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/getLocalUp.glsl.js";import"../core/shaderLibrary/shading/lightingUniforms.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/readShadow.glsl.js";import"../core/shaderLibrary/shading/WaterColor.glsl.js";import"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../shaders/OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../chunks/Water.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../core/shaderLibrary/shading/calculateUVZShadow.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/lightingUniforms.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/readShadow.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import"../core/shaderModules/glsl.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"./GaussianSplatTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplat.glsl.js";
|
|
2
|
+
import"../core/shaderLibrary/shading/calculateUVZShadow.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/lightingUniforms.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/shading/readShadow.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import"../core/shaderModules/glsl.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"./GaussianSplatTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplat.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../core/shaderModules/glsl.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplatDepth.glsl.js";
|
|
2
|
+
import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderModules/glsl.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplatDepth.glsl.js";
|
|
@@ -1,12 +1,53 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{rejectBySlicePass as e}from"../core/shaderLibrary/Slice.glsl.js";import{DepthConversion as t}from"../core/shaderLibrary/output/DepthConversion.glsl.js";import{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import{rejectBySlicePass as e}from"../core/shaderLibrary/Slice.glsl.js";import{DepthConversion as t}from"../core/shaderLibrary/output/DepthConversion.glsl.js";import{inverseProjectionMatrix as n,inverseScreenSize as r,projMatrix as i,viewMatrix as a,nearFar as o}from"../core/shaderLibrary/util/cameraUniforms.js";import{GaussianSplatCovariance as s}from"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as c}from"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as l}from"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as u}from"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as d}from"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2PassUniform as f}from"../core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as p}from"../core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as m}from"../core/shaderModules/FloatPassUniform.js";import{glsl as h,If as g}from"../core/shaderModules/glsl.js";import{Texture2DUintPassUniform as _}from"../core/shaderModules/Texture2DUintPassUniform.js";function v(e,t){let{fragment:n,vertex:f}=e;f.uniforms.add(new _(`splatOrderTexture`,e=>e.splatOrder),new _(`splatAtlasTexture`,e=>e.splatAtlas),new _(`splatHeaderTexture`,e=>e.splatHeader),new m(`minSplatRadius`,e=>e.minSplatRadius),r,i,a,o),f.include(u),f.include(l),f.include(d),f.include(s),f.include(c),f.include(S,t),n.include(c),n.include(S,t)}function y(e,r){e.include(v,r),e.vertex.uniforms.add(new m(`focalLength`,e=>e.focalLength),new f(`tanFov`,e=>e.tanFov)),e.vertex.code.add(h`struct GaussianSplatProjection {
|
|
3
|
+
vec4 clipPosition;
|
|
4
|
+
vec3 viewOffset;
|
|
5
|
+
vec2 coordinates;
|
|
6
|
+
float logFalloffCutoff;
|
|
7
|
+
};
|
|
8
|
+
bool projectGaussianSplat(
|
|
9
|
+
vec3 viewPosition,
|
|
10
|
+
vec3 gaussianScale,
|
|
11
|
+
mat3 gaussianRotation,
|
|
12
|
+
float alphaCutoff,
|
|
13
|
+
float logAlphaCutoff,
|
|
14
|
+
inout float opacity,
|
|
15
|
+
out GaussianSplatProjection projection
|
|
16
|
+
) {
|
|
17
|
+
vec3 covariance2D = computeGaussianCovariance2D(viewPosition, focalLength, tanFov, gaussianScale, gaussianRotation, view);
|
|
18
|
+
float minimumRadiusOpacity = opacity;
|
|
19
|
+
float opacityScale = regularizeGaussianCovariance(covariance2D);
|
|
20
|
+
opacity *= opacityScale;
|
|
21
|
+
if (opacity < alphaCutoff) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
float determinant = computeGaussianCovarianceDeterminant(covariance2D);
|
|
25
|
+
if (determinant <= 0.0) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);
|
|
29
|
+
projection.logFalloffCutoff = logAlphaCutoff - log(opacity);
|
|
30
|
+
float ellipseThreshold = computeGaussianEllipseThreshold(projection.logFalloffCutoff);
|
|
31
|
+
vec2 screenRadii = computeGaussianScreenRadii(covariance2D, ellipseThreshold);
|
|
32
|
+
float maxRadius = ceil(sqrt(eigenvalues.x * ellipseThreshold));
|
|
33
|
+
if (rejectGaussianByMinimumRadius(maxRadius, minimumRadiusOpacity, minSplatRadius)) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
vec4 projPos = proj * vec4(viewPosition, 1.0);
|
|
37
|
+
float invW = 1.0 / (projPos.w + 1e-7);
|
|
38
|
+
vec3 ndcPosition = projPos.xyz * invW;
|
|
39
|
+
vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;
|
|
40
|
+
if (rejectGaussianByScreenBounds(ndcPosition.xy, screenRadii, clipSpacePixelScale)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
projection.coordinates = computeGaussianUnitQuadCorner(gl_VertexID) * sqrt(ellipseThreshold);
|
|
44
|
+
vec2 offsetFromCenter = computeGaussianQuadOffset(covariance2D, determinant, projection.coordinates);
|
|
45
|
+
float viewSpacePixelScale = -viewPosition.z / focalLength;
|
|
46
|
+
projection.viewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);
|
|
47
|
+
vec2 quadClipPosition = ndcPosition.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;
|
|
48
|
+
projection.clipPosition = vec4(quadClipPosition, ndcPosition.z, 1.0);
|
|
49
|
+
return true;
|
|
50
|
+
}`),r.preciseDepth&&(e.include(b),e.vertex.uniforms.add(n),e.fragment.include(t))}function b(e){e.vertex.code.add(h`vec3 reconstructViewRay(vec2 clipPosition, mat4 inverseProjection) {
|
|
10
51
|
vec3 rayViewPoint = (inverseProjection * vec4(clipPosition, -1.0, 1.0)).xyz;
|
|
11
52
|
return vec3(-rayViewPoint.xy / rayViewPoint.z, -1.0);
|
|
12
53
|
}
|
|
@@ -21,110 +62,22 @@ vec3 inverseGaussianScale = 1.0 / gaussianScale;
|
|
|
21
62
|
vec3 rayGaussianFactorCenter = (gaussianRotation * cameraRelativePosition) * inverseGaussianScale;
|
|
22
63
|
vec3 rayGaussianFactorRay = (gaussianRotation * (transpose(viewRotation) * rayView)) * inverseGaussianScale;
|
|
23
64
|
return vec4(rayGaussianFactorRay, dot(rayGaussianFactorCenter, rayGaussianFactorRay));
|
|
24
|
-
}`);let t=
|
|
25
|
-
return
|
|
26
|
-
}`;e.vertex.code.add(t),e.fragment.code.add(t)}function
|
|
65
|
+
}`);let t=h`float computeGaussianRayDepth(vec4 rayFactor) {
|
|
66
|
+
return rayFactor.w / dot(rayFactor.xyz, rayFactor.xyz);
|
|
67
|
+
}`;e.vertex.code.add(t),e.fragment.code.add(t)}function x(e){e.uniforms.add(new _(`splatFadingTexture`,e=>e.splatFading)),e.code.add(h`float applyGaussianSplatFading(float opacity, uint gaussianIndex) {
|
|
27
68
|
uint pageIndex = fetchGaussianPageIndex(gaussianIndex);
|
|
28
69
|
uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);
|
|
29
70
|
uint fadeX = pageIndex % fadingTextureWidth;
|
|
30
71
|
uint fadeY = pageIndex / fadingTextureWidth;
|
|
31
72
|
uint opacityModifier = texelFetch(splatFadingTexture, ivec2(fadeX, fadeY), 0).r;
|
|
32
73
|
return opacity * float(opacityModifier) / 255.0;
|
|
33
|
-
}`)}function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
${_(r,g`
|
|
43
|
-
if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||
|
|
44
|
-
cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
`)}
|
|
48
|
-
|
|
49
|
-
${_(i,g`
|
|
50
|
-
if (rejectBySlice(cameraRelativePosition)) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
`)}
|
|
54
|
-
|
|
55
|
-
vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1.0);
|
|
56
|
-
|
|
57
|
-
if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
`}const w=g`vec3 gaussianScale = unpackScale(packedGaussian);
|
|
61
|
-
mat3 gaussianRotation = quaternionToRotationMatrix(unpackQuaternion(packedGaussian));`;function T(e,t){return g`
|
|
62
|
-
float determinant = computeGaussianCovarianceDeterminant(covariance2D);
|
|
63
|
-
if (determinant <= 0.0) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);
|
|
68
|
-
gaussianLogAlphaCutoff = ${e};
|
|
69
|
-
float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);
|
|
70
|
-
vec2 screenRadii = computeGaussianScreenRadii(covariance2D, gaussianEllipseThreshold);
|
|
71
|
-
float maxRadius = ceil(sqrt(eigenvalues.x * gaussianEllipseThreshold));
|
|
72
|
-
|
|
73
|
-
if (rejectGaussianByMinimumRadius(maxRadius, ${t}, minSplatRadius)) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
`}const E=g`vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;
|
|
77
|
-
if (rejectGaussianByScreenBounds(ndcPos.xy, screenRadii, clipSpacePixelScale)) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
vec2 quadCorner = computeGaussianUnitQuadCorner(gl_VertexID);
|
|
81
|
-
gaussianCoordinates = quadCorner * sqrt(gaussianEllipseThreshold);
|
|
82
|
-
float inverseRadiusX = inversesqrt(covariance2D.x);
|
|
83
|
-
vec2 choleskyAxisX = covariance2D.xy * inverseRadiusX;
|
|
84
|
-
vec2 choleskyAxisY = vec2(0.0, sqrt(determinant) * inverseRadiusX);
|
|
85
|
-
vec2 offsetFromCenter = gaussianCoordinates.x * choleskyAxisX + gaussianCoordinates.y * choleskyAxisY;`;function D(e,t){return g`
|
|
86
|
-
${C(e,g.float(t))}
|
|
87
|
-
|
|
88
|
-
${w}
|
|
89
|
-
vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, gaussianScale, gaussianRotation, view);
|
|
90
|
-
float minimumRadiusOpacity = opacity;
|
|
91
|
-
float opacityScale = regularizeGaussianCovariance(covariance2D);
|
|
92
|
-
opacity *= opacityScale;
|
|
93
|
-
if (opacity < ${g.float(t)}) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
${T(`${g.float(Math.log(t))} - log(opacity)`,`minimumRadiusOpacity`)}
|
|
98
|
-
${O(e)}
|
|
99
|
-
`}function O(e){return g`
|
|
100
|
-
vec4 projPos = proj * viewPos;
|
|
101
|
-
float invW = 1.0 / (projPos.w + 1e-7);
|
|
102
|
-
vec3 ndcPos = projPos.xyz * invW;
|
|
103
|
-
${E}
|
|
104
|
-
|
|
105
|
-
float viewSpacePixelScale = -viewPos.z / focalLength;
|
|
106
|
-
vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);
|
|
107
|
-
fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;
|
|
108
|
-
|
|
109
|
-
vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;
|
|
110
|
-
${_(e.preciseDepth,g`
|
|
111
|
-
vec3 rayView = reconstructViewRay(quadClipPosition, inverseProjectionMatrix);
|
|
112
|
-
rayGaussianFactor = computeGaussianRayFactor(
|
|
113
|
-
rayView, cameraRelativePosition, gaussianScale, gaussianRotation, mat3(view)
|
|
114
|
-
);
|
|
115
|
-
`)}
|
|
116
|
-
gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);
|
|
117
|
-
`}function k(e){let{clippingEnabled:t,hasSlicePlane:n}=e;return g`
|
|
118
|
-
${_(t,g`
|
|
119
|
-
if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||
|
|
120
|
-
fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {
|
|
121
|
-
discard;
|
|
122
|
-
}
|
|
123
|
-
`)}
|
|
124
|
-
${_(n,g`if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }`)}
|
|
125
|
-
|
|
126
|
-
float gaussianExponent = evaluateGaussianExponent(gaussianCoordinates);
|
|
127
|
-
if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {
|
|
128
|
-
discard;
|
|
74
|
+
}`)}function S(t,n){n.clippingEnabled&&t.uniforms.add(new p(`clipMin`,e=>e.clipMinCameraRelative),new p(`clipMax`,e=>e.clipMaxCameraRelative)),t.include(e,n),t.code.add(h`
|
|
75
|
+
bool rejectGaussianPosition(vec3 positionCameraRelative) {
|
|
76
|
+
${g(n.clippingEnabled,h`
|
|
77
|
+
if (any(lessThan(positionCameraRelative, clipMin)) || any(greaterThan(positionCameraRelative, clipMax))) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
`)}
|
|
81
|
+
return ${n.hasSlicePlane?`rejectBySlice(positionCameraRelative)`:`false`};
|
|
129
82
|
}
|
|
130
|
-
`}export{
|
|
83
|
+
`)}export{v as gaussianSplatCommon,x as gaussianSplatFading,y as gaussianSplatPerspective,b as gaussianSplatRayDepth};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4PassUniform.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"./GaussianSplatPassParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GaussianSplatShadowPassParameters,b as build}from"../../../../chunks/GaussianSplatShadow.glsl.js";
|
|
2
|
+
import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4PassUniform.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"./GaussianSplatPassParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GaussianSplatShadowPassParameters,b as build}from"../../../../chunks/GaussianSplatShadow.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../../support/engineContent/marker.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js";import"../core/shaderLibrary/shading/
|
|
2
|
+
import"../../support/engineContent/marker.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js";import"../core/shaderLibrary/shading/forwardLocalUp.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/LineMarker.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/
|
|
2
|
+
import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/forwardLocalUp.glsl.js";import"../core/shaderLibrary/shading/lightingUniforms.js";import"../core/shaderLibrary/shading/LineStipple.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/shading/readFragmentShadow.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./alphaCutoff.glsl.js";import"./animatedAlpha.glsl.js";import"./lineUniforms.js";import"./OutputColorHighlightOLID.glsl.js";import"./RibbonLineTextureBuffer.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build,n as numRoundJoinSubdivisions}from"../../../../chunks/RibbonLine.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/bindUniforms.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexTangent.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/OutputHighlightOverlay.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/
|
|
2
|
+
import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/bindUniforms.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexTangent.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/OutputHighlightOverlay.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/forwardLocalUp.glsl.js";import"../core/shaderLibrary/shading/lightingUniforms.js";import"../core/shaderLibrary/shading/readShadow.glsl.js";import"../core/shaderLibrary/terrain/Overlay.glsl.js";import"../core/shaderLibrary/terrain/TerrainTexture.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3BindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{T as TerrainPassParameters,b as build}from"../../../../chunks/Terrain.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../core/Evented.js";import{clone as n}from"../../core/lang.js";import{equalsMaybe as r,destroyMaybe as i}from"../../core/maybe.js";import{memoize as a}from"../../core/memoize.js";import{ignoreAbortErrors as o}from"../../core/promiseUtils.js";import s from"../../core/ReactiveSet.js";import{watch as c,syncAndInitial as l}from"../../core/reactiveUtils.js";import{createScreenPoint as u}from"../../core/screenUtils.js";import{property as d,subclass as f}from"../../core/accessorSupport/decorators.js";import{diff as p}from"../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as m}from"../../core/support/UpdatingHandles.js";import{pointEquals as h,pointNear as g}from"../../layers/graphics/dehydratedFeatureComparison.js";import{getEffectiveElevationInfo as _}from"../../support/elevationInfoUtils.js";import{defaultDrawingMode as v}from"./drawingModes.js";import{LegacyDrawManipulator as y}from"./LegacyDrawManipulator.js";import{createCoordinateHelper as b}from"../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as x,sceneSnappingAtLocation as S}from"../interactive/dragEventPipeline.js";import{EditGeometry as C,Part as w}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as T}from"../interactive/editGeometry/EditGeometryOperations.js";import{isPoint as E}from"../interactive/sketch/constraints.js";import{getPointConstraint as D,getPolylineOrPolygonConstraint as O,pointToConstraintSpace as k,constraintSpaceToPoint as A}from"../interactive/sketch/constraintUtils.js";import j from"../interactive/sketch/SketchLabelOptions.js";import{SnappingContext as M}from"../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as N}from"../interactive/snapping/SnappingDragPipelineStep.js";import{SnappingOperation as P}from"../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as F}from"../interactive/snapping/snappingUtils.js";const I=`crosshair`,L=`progress`,R=Symbol(),z=Symbol();let B=class extends t{constructor(e){super(e),this._createOperationCompleted=!1,this._hideDefaultCursor=!1,this._pointerDownStates=new s,this._stagedScreenPoint=null,this._stagedPointerType=null,this._updatingHandles=new m,this._stagedPointerId=null,this.constraintsEnabled=!1,this.constraints=void 0,this._getPointConstraint=a(D),this._getPolylineOrPolygonConstraint=a(O),this.constraintZ=null,this.defaultZ=null,this.isDraped=!0,this.labelOptions=new j,this.cursor=null,this.loading=!1,this.snapToSceneEnabled=null,this.firstVertex=null,this.lastVertex=null,this.secondToLastVertex=null,e.elevationInfo??(this.elevationInfo=_(!!e.hasZ))}initializePointer(){let e=this.view.inputManager?.latestPointerInfo;e!=null&&e.type!==`touch`&&this._updatePointer(e.location,e.id,e.type)}initialize(){let{geometryType:e,view:t}=this,n=t.spatialReference,i=`viewingMode`in t.state?t.state.viewingMode:2,a=e===`segment`||e===`multipoint`?`polyline`:e;this.coordinateHelper=b(this.hasZ,this.hasM,n),this._editGeometryOperations=new T(new C(a,this.coordinateHelper),i),this._snappingOperation=new P({view:t}),this.addHandles([c(()=>({stagedPoint:this._snappingOperation.stagedPoint,constraint:this._constraint}),({stagedPoint:e,constraint:t},n)=>{let{snappingOptions:r}=this;if(r&&(r.forceDisabled=t!=null&&E(t)),n!=null&&e===n.stagedPoint&&t!==n.constraint)return this._onKeyboardBasedChange();this._processCursor(e??this._screenToMap(this._stagedScreenPoint))},{equals:(e,t)=>e.stagedPoint===t.stagedPoint&&r(e.constraint,t.constraint)}),c(()=>this.view.viewpoint,(e,t)=>{e&&t&&p(e,t)&&this._onKeyboardBasedChange()})]),this._activePart=new w(n,i),this._editGeometryOperations.data.parts.push(this._activePart);let s=this.segmentLabels;s!=null&&(s.context={view:t,editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,labelOptions:this.labelOptions},this.addHandles(c(()=>this.labelOptions.enabled,e=>{s.visible=e},l))),this.addHandles(this._editGeometryOperations.on([`vertex-add`,`vertex-update`,`vertex-remove`],e=>{let t=e.vertices.map(e=>({componentIndex:0,vertexIndex:e.index,coordinates:this.coordinateHelper.vectorToArray(e.pos)})),n=t.map(e=>e.coordinates),r=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getFirstVertex()?.pos)??null;h(r,this.firstVertex)||(this.firstVertex=r);let i=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getLastVertex()?.pos)??null;h(i,this.lastVertex)||(this.lastVertex=i);let a=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.segments.at(-1)?.leftVertex?.pos)??null;switch(h(a,this.secondToLastVertex)||(this.secondToLastVertex=a),this._processCursor(this.cursorVertex),e.type){case`vertex-add`:this.emit(e.type,{...e,added:n,vertices:t});break;case`vertex-update`:this.emit(e.type,{...e,updated:n,vertices:t});break;case`vertex-remove`:this.emit(e.type,{...e,removed:n,vertices:t})}}));let u=this._manipulator=new y({consumesClicks:!1,grabbableForEvent:e=>this.drawingMode!==`click`||e.pointerType===`touch`&&this._snappingEnabled&&this._pointerDownStates.size===1});this.manipulators.add(u),u.grabbable=e!==`point`&&e!==`multipoint`,this.addHandles([u.events.on(`immediate-click`,e=>this._onImmediateClick(e)),u.events.on(`immediate-double-click`,e=>this._onImmediateDoubleClick(e)),c(()=>this.drawingMode,()=>{this.removeHandles(R),this.addHandles(this._createManipulatorDragPipeline(u),R)},l),c(()=>({effectiveCursor:this.effectiveCursor}),({effectiveCursor:e})=>{u.cursor=e},l)]),F(this,()=>{let e=this.view.inputManager.latestPointerInfo?.type??`mouse`,t=this._getSnappingContext(e);if(this.snappingManager!=null){let e=this._snappingOperation.snapAgainNearPreviousMapPoint(this.snappingManager,t);this._updatingHandles.consumePromise(o(e))}})}destroy(){i(this.segmentLabels),i(this._snappingOperation),this._editGeometryOperations=i(this._editGeometryOperations),this._updatingHandles.destroy()}get _isDragging(){let{_stagedPointerId:e,_manipulator:t}=this;return e!=null&&this._pointerDownStates.has(e)||t.grabbing||!t.interactive}get _snappingEnabled(){return this.snappingManager!=null&&this.snappingManager.options.effectiveEnabled}get _requiresScenePoint(){let e=this._updateAndGetEffectiveDrawSurface();return this.view.type===`3d`&&this.drawSurface!==e}get canRedo(){return this._editGeometryOperations.canRedo}get canUndo(){return this._editGeometryOperations.canUndo}get committedVertices(){return this._activePart.vertices.map(e=>this.coordinateHelper.vectorToArray(e.pos))}get _constraint(){let{constraints:e,constraintsEnabled:t}=this;if(e&&t)switch(this.geometryType){case`point`:case`multipoint`:return this._getPointConstraint(e);case`polygon`:case`polyline`:return this._getPolylineOrPolygonConstraint(this.lastVertex,this.secondToLastVertex,e)}}set drawingMode(e){this._set(`drawingMode`,e??v)}get effectiveCursor(){return this.loading?L:this._hideDefaultCursor?null:this.cursor||I}get interactive(){return this._manipulator.interactive}set interactive(e){this._manipulator.interactive=e}get isCompleted(){return this._createOperationCompleted}get numCommittedVertices(){return this._activePart.vertices.length}get snappingOptions(){return this.snappingManager==null?null:this.snappingManager.options}get cursorVertex(){return this._get(`cursorVertex`)}get visualizationCursorVertex(){return this._stagedPointerType===`mouse`?this.cursorVertex:null}get committableVertex(){let{cursorVertex:e,lastVertex:t,firstVertex:n,geometryType:r}=this;return r===`polygon`&&g(e,n)||g(e,t)?null:e}get updating(){return this.loading||this._updatingHandles.updating||!!this.segmentLabels?.updating}get geometryIncludingUncommittedVertices(){let{committedVertices:e,committableVertex:t,coordinateHelper:n}=this,r=e.slice();return t!=null&&r.push(n.pointToArray(t)),r}cancel(){this.complete({aborted:!0})}commitStagedVertex(){this._snappingOperation.abort();let{committableVertex:e}=this;e!=null&&this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(e),this._activePart)}complete(e){let t=e?.aborted||!1;this._snappingOperation.abort(),this.snappingManager?.doneSnapping();let{geometryType:n,numCommittedVertices:r}=this,i=n===`multipoint`&&r===0||n===`polyline`&&r<2||n===`polygon`&&r<3;(n===`segment`||n===`point`)&&this.commitStagedVertex(),this._createOperationCompleted=!i,(this.isCompleted||t)&&(this._stagedScreenPoint=null,this._stagedPointerId=null,this._stagedPointerType=null,this._processCursor(null),this.emit(`complete`,{vertices:this.committedVertices.map((e,t)=>({componentIndex:0,vertexIndex:t,coordinates:e})),aborted:t,type:`complete`}))}onInputEvent(e){switch(e.type){case`pointer-down`:this._pointerDownStates.add(e.pointerId);break;case`pointer-up`:this._pointerDownStates.delete(e.pointerId)}switch(e.type){case`pointer-move`:return this._onPointerMove(e);case`hold`:return this._onHold(e)}}redo(){this._editGeometryOperations.redo()}undo(){this.snappingManager!=null&&this.snappingManager.doneSnapping(),this._editGeometryOperations.undo()}_processCursor(e){let t=n(this.cursorVertex),r=n(e),i=r&&(this._updateAndGetEffectiveDrawSurface()?.constrainZ(r)??r),a=this._snapToClosingVertex(i),o=this._applyConstraints(a);g(t,o)||(this._set(`cursorVertex`,o),this.segmentLabels?.set(`stagedVertex`,o==null?null:this.coordinateHelper.pointToVector(o)),o==null||this._stagedPointerType!==`mouse`?this.emit(`cursor-remove`):this.emit(`cursor-update`,{updated:null,vertices:[{componentIndex:0,vertexIndex:this._activePart.vertices.length,coordinates:this.coordinateHelper.pointToArray(o)}],operation:`apply`,type:`vertex-update`}))}_snapToClosingVertex(e){if(e==null||this._isDragging||this.geometryType!==`polygon`||this.numCommittedVertices<=2)return e;let t=this._mapToScreen(e);if(!t)return e;let n=this._activePart;return this._vertexWithinPointerDistance(n.vertices[0].pos,t)?this.firstVertex:this._vertexWithinPointerDistance(n.vertices.at(-1).pos,t)?this.lastVertex:e}_createManipulatorDragPipeline(e){switch(this.drawingMode){case`click`:return this._createManipulatorDragPipelineClick(e);case`freehand`:return this._createManipulatorDragPipelineFreehand(e);case`hybrid`:return this._createManipulatorDragPipelineHybrid(e)}}_createManipulatorDragPipelineClick(e){return x(e,(e,t,n,r)=>{let i=r===`touch`&&this._snappingEnabled;if(this.isCompleted||!i)return;let{snappingStep:a,cancelSnapping:o}=N({predicate:()=>i,snappingManager:this.snappingManager,snappingContext:new M({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,feature:this.graphic,pointer:r,visualizer:this.snappingVisualizer,drawConstraints:this.constraints}),updatingHandles:this._updatingHandles,useZ:!this._requiresScenePoint});n.next(e=>(i&&this.snappingManager!=null&&this.snappingManager.doneSnapping(),e)).next(o),t.next(this._screenToMapDragEventStep()).next(e=>(e.action===`start`&&(this._processCursor(e.mapStart),(this.geometryType===`segment`||i&&!this.numCommittedVertices)&&this.commitStagedVertex()),e)).next(S(this.view,this.elevationInfo)).next(...a).next(e=>(i&&(this._processCursor(e.mapEnd),e.action===`end`&&this.commitStagedVertex()),e)).next(e=>(e.action===`end`&&(this._stagedPointerType!==`mouse`&&this._snappingOperation.abort(),(this.geometryType===`segment`||this.geometryType===`point`)&&this.complete()),e))})}_createManipulatorDragPipelineFreehand(e){return x(e,(e,t)=>{this.isCompleted||t.next(this._screenToMapDragEventStep()).next(e=>(e.action===`start`&&(this._snappingOperation.abort(),this.committableVertex??this._processCursor(e.mapStart),this.geometryType===`segment`&&this.commitStagedVertex()),e)).next(e=>{switch(e.action){case`start`:case`update`:this._processCursor(e.mapEnd),(this.geometryType===`polygon`||this.geometryType===`polyline`)&&this.commitStagedVertex();break;case`end`:this.complete()}return e})})}_createManipulatorDragPipelineHybrid(e){return x(e,(e,t)=>{this.isCompleted||t.next(this._screenToMapDragEventStep()).next(e=>(e.action===`start`&&(this._snappingOperation.abort(),this.addHandles(this._editGeometryOperations.createUndoGroup(),z),this._processCursor(e.mapStart),this.commitStagedVertex()),e)).next(e=>{switch(e.action){case`start`:case`update`:this._processCursor(e.mapEnd),(this.geometryType===`polygon`||this.geometryType===`polyline`)&&this.commitStagedVertex();break;case`end`:this._stagedPointerType!==`mouse`&&this._snappingOperation.abort(),this.removeHandles(z),(this.geometryType===`segment`||this.geometryType===`point`)&&this.complete()}return e})})}get _drawAtFixedElevation(){let{constraintsEnabled:e,constraintZ:t,geometryType:n,numCommittedVertices:r}=this;return e?t!=null||n===`segment`&&r>0:(n===`segment`||n===`polygon`)&&r>0}_updateAndGetEffectiveDrawSurface(){let{constraintsEnabled:e,coordinateHelper:t,drawSurface:n,elevationDrawSurface:r,snapToSceneEnabled:i}=this;if(r==null)return n;if(!this.hasZ)return r.defaultZ=null,r;let a=this.elevationInfo?.mode,o=this.defaultZ,s=e||a===`absolute-height`;return i!=null&&(s=i),a===`on-the-ground`&&(s=!1),this._drawAtFixedElevation&&(o=(e?this.constraintZ:null)??t.getZ(this._activePart.vertices[0].pos),s=!1),s?n:(r.defaultZ=o,r)}_mapToScreen(e){return this._updateAndGetEffectiveDrawSurface()?.mapToScreen(e)}_onHold(e){this._snappingOperation.abort(),this.drawingMode===`click`&&e.pointerType===`touch`&&this._snappingEnabled&&this._processCursor(e.mapPoint),e.stopPropagation()}_onImmediateClick(e){if(!(e.pointerType===`mouse`&&e.button===2||this._manipulator.dragging))try{let{drawingMode:t,geometryType:n}=this;this._stagedPointerType=e.pointerType,this._stagedScreenPoint=e.screenPoint;let r=this._screenToMap(e.screenPoint);if(r==null||r==null||t===`freehand`&&n!==`point`&&n!==`multipoint`)return;if(this._snappingEnabled&&this.cursorVertex!=null||this._processCursor(r),this.committableVertex==null){this.complete();return}this.commitStagedVertex(),e.pointerType!==`mouse`&&this._processCursor(null),(t===`freehand`&&this.geometryType!==`multipoint`||n===`point`||n===`segment`&&this.numCommittedVertices===2||n===`segment`&&t===`hybrid`&&this.numCommittedVertices===1)&&this.complete()}finally{e.stopPropagation()}}_onImmediateDoubleClick(e){this._manipulator.dragging||this.geometryType===`point`||(this.complete(),e.stopPropagation())}_onPointerMove(e){let t=u(e.x,e.y);this._updatePointer(t,e.pointerId,e.pointerType)&&e.stopPropagation()}_updatePointer(e,t,n){return this._stagedScreenPoint=e,this._stagedPointerType=n,this._stagedPointerId=t,this._isDragging?(this._snappingOperation.abort(),!1):(this._processCursorMovementRelativeToSurface(e,n),!0)}_onKeyboardBasedChange(){this._stagedPointerType!==`mouse`||!this._stagedScreenPoint||this._stagedPointerId==null||this._isDragging?this._snappingOperation.abort():this._processCursorMovementRelativeToSurface(this._stagedScreenPoint,this._stagedPointerType)}_processCursorMovementRelativeToSurface(e,t){let n=this._snappingOperation,r=this._screenToMap(e),i=this._requiresScenePoint?this.drawSurface?.screenToMap(e):null;if(r==null){this._hideDefaultCursor=!0,this._processCursor(null),n.abort();return}this._hideDefaultCursor=!1;let a=this.snappingManager;if(a==null){this._processCursor(r),n.abort();return}let s=this._getSnappingContext(t);this._updatingHandles.consumePromise(o(n.snap({point:r,scenePoint:i},a,s)))}_applyConstraints(e){let{_constraint:t,constraints:n}=this;if(!e||!n||!t)return e;let{context:r}=n,i=k(e,r),a=i?t.closestTo(i):void 0;if(!a)return e;let o=A(a,e,r),s=this.view.type===`2d`||r.elevationInfo.mode!==`absolute-height`;return o!=null&&s&&this.constraintZ!=null&&this.hasZ&&(o.z=this.constraintZ),o}_screenToMap(e){return e?this._updateAndGetEffectiveDrawSurface()?.screenToMap(e):null}_screenToMapDragEventStep(){let e=null;return t=>{if(t.action===`start`&&(e=this._screenToMap(t.screenStart)),e==null)return null;let n=this._screenToMap(t.screenEnd);return n==null?null:{...t,mapStart:e,mapEnd:n}}}_vertexWithinPointerDistance(e,t){let n=this._mapToScreen(this.coordinateHelper.vectorToDehydratedPoint(e));return n!=null&&V(n,t,25)}_getSnappingContext(e){let t=this._drawAtFixedElevation?this.elevationDrawSurface?.defaultZ:null;return new M({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:e,feature:this.graphic,visualizer:this.snappingVisualizer,selfSnappingZ:t==null?null:{value:t,elevationInfo:this.elevationInfo},drawConstraints:this.constraints})}};e([d()],B.prototype,`_hideDefaultCursor`,void 0),e([d()],B.prototype,`_stagedPointerId`,void 0),e([d()],B.prototype,`_isDragging`,null),e([d()],B.prototype,`_snappingOperation`,void 0),e([d()],B.prototype,`_snappingEnabled`,null),e([d({constructOnly:!0})],B.prototype,`graphic`,void 0),e([d()],B.prototype,`constraintsEnabled`,void 0),e([d()],B.prototype,`constraints`,void 0),e([d()],B.prototype,`_constraint`,null),e([d()],B.prototype,`constraintZ`,void 0),e([d()],B.prototype,`defaultZ`,void 0),e([d()],B.prototype,`isDraped`,void 0),e([d({value:v})],B.prototype,`drawingMode`,null),e([d({constructOnly:!0})],B.prototype,`elevationDrawSurface`,void 0),e([d({constructOnly:!0})],B.prototype,`elevationInfo`,void 0),e([d({constructOnly:!0,type:j})],B.prototype,`labelOptions`,void 0),e([d({constructOnly:!0})],B.prototype,`geometryType`,void 0),e([d({constructOnly:!0})],B.prototype,`hasM`,void 0),e([d({constructOnly:!0})],B.prototype,`hasZ`,void 0),e([d()],B.prototype,`cursor`,void 0),e([d()],B.prototype,`effectiveCursor`,null),e([d()],B.prototype,`loading`,void 0),e([d({constructOnly:!0})],B.prototype,`manipulators`,void 0),e([d({constructOnly:!0})],B.prototype,`drawSurface`,void 0),e([d({constructOnly:!0})],B.prototype,`segmentLabels`,void 0),e([d({constructOnly:!0})],B.prototype,`snappingManager`,void 0),e([d({constructOnly:!0})],B.prototype,`snappingVisualizer`,void 0),e([d()],B.prototype,`snapToSceneEnabled`,void 0),e([d({readOnly:!0})],B.prototype,`cursorVertex`,null),e([d({readOnly:!0})],B.prototype,`visualizationCursorVertex`,null),e([d()],B.prototype,`committableVertex`,null),e([d()],B.prototype,`firstVertex`,void 0),e([d()],B.prototype,`lastVertex`,void 0),e([d()],B.prototype,`secondToLastVertex`,void 0),e([d()],B.prototype,`updating`,null),e([d({constructOnly:!0})],B.prototype,`view`,void 0),B=e([f(`esri.views.draw.DrawOperation`)],B);function V(e,t,n){let r=e.x-t.x,i=e.y-t.y;return r*r+i*i<=n}export{B as DrawOperation,I as defaultCursor,L as defaultLoadingCursor};
|
|
2
|
+
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../core/Evented.js";import{clone as n}from"../../core/lang.js";import{equalsMaybe as r,destroyMaybe as i}from"../../core/maybe.js";import{memoize as a}from"../../core/memoize.js";import{ignoreAbortErrors as o}from"../../core/promiseUtils.js";import s from"../../core/ReactiveSet.js";import{watch as c,syncAndInitial as l}from"../../core/reactiveUtils.js";import{createScreenPoint as u}from"../../core/screenUtils.js";import{property as d,subclass as f}from"../../core/accessorSupport/decorators.js";import{diff as p}from"../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as m}from"../../core/support/UpdatingHandles.js";import{pointEquals as h,pointNear as g}from"../../layers/graphics/dehydratedFeatureComparison.js";import{getEffectiveElevationInfo as _}from"../../support/elevationInfoUtils.js";import{defaultDrawingMode as v}from"./drawingModes.js";import{LegacyDrawManipulator as y}from"./LegacyDrawManipulator.js";import{createCoordinateHelper as b}from"../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as x,sceneSnappingAtLocation as S}from"../interactive/dragEventPipeline.js";import{EditGeometry as C,Part as w}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as T}from"../interactive/editGeometry/EditGeometryOperations.js";import{isPoint as E}from"../interactive/sketch/constraints.js";import{getPointConstraint as D,getPolylineOrPolygonConstraint as O,pointToConstraintSpace as k,constraintSpaceToPoint as A}from"../interactive/sketch/constraintUtils.js";import j from"../interactive/sketch/SketchLabelOptions.js";import{SnappingContext as M}from"../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as N}from"../interactive/snapping/SnappingDragPipelineStep.js";import{SnappingOperation as P}from"../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as F}from"../interactive/snapping/snappingUtils.js";const I=`crosshair`,L=`progress`,R=Symbol(),z=Symbol();let B=class extends t{constructor(e){super(e),this._createOperationCompleted=!1,this._hideDefaultCursor=!1,this._pointerDownStates=new s,this._stagedScreenPoint=null,this._stagedPointerType=null,this._updatingHandles=new m,this._stagedPointerId=null,this.constraintsEnabled=!1,this.constraints=void 0,this._getPointConstraint=a(D),this._getPolylineOrPolygonConstraint=a(O),this.constraintZ=null,this.defaultZ=null,this.isDraped=!0,this.labelOptions=new j,this.cursor=null,this.loading=!1,this.snapToSceneEnabled=null,this.firstVertex=null,this.lastVertex=null,this.secondToLastVertex=null,e.elevationInfo??(this.elevationInfo=_(!!e.hasZ))}initializePointer(){let e=this.view.inputManager?.latestPointerInfo;e!=null&&e.type!==`touch`&&this._updatePointer(e.location,e.id,e.type)}initialize(){let{geometryType:e,view:t,spatialReference:n}=this,i=`viewingMode`in t.state?t.state.viewingMode:2,a=e===`segment`||e===`multipoint`?`polyline`:e;this.coordinateHelper=b(this.hasZ,this.hasM,n),this._editGeometryOperations=new T(new C(a,this.coordinateHelper),i),this._snappingOperation=new P({view:t}),this.addHandles([c(()=>({stagedPoint:this._snappingOperation.stagedPoint,constraint:this._constraint}),({stagedPoint:e,constraint:t},n)=>{let{snappingOptions:r}=this;if(r&&(r.forceDisabled=t!=null&&E(t)),n!=null&&e===n.stagedPoint&&t!==n.constraint)return this._onKeyboardBasedChange();this._processCursor(e??this._screenToMap(this._stagedScreenPoint))},{equals:(e,t)=>e.stagedPoint===t.stagedPoint&&r(e.constraint,t.constraint)}),c(()=>this.view.viewpoint,(e,t)=>{e&&t&&p(e,t)&&this._onKeyboardBasedChange()})]),this._activePart=new w(n,i),this._editGeometryOperations.data.parts.push(this._activePart);let s=this.segmentLabels;s!=null&&(s.context={view:t,editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,labelOptions:this.labelOptions},this.addHandles(c(()=>this.labelOptions.enabled,e=>{s.visible=e},l))),this.addHandles(this._editGeometryOperations.on([`vertex-add`,`vertex-update`,`vertex-remove`],e=>{let t=e.vertices.map(e=>({componentIndex:0,vertexIndex:e.index,coordinates:this.coordinateHelper.vectorToArray(e.pos)})),n=t.map(e=>e.coordinates),r=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getFirstVertex()?.pos)??null;h(r,this.firstVertex)||(this.firstVertex=r);let i=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getLastVertex()?.pos)??null;h(i,this.lastVertex)||(this.lastVertex=i);let a=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.segments.at(-1)?.leftVertex?.pos)??null;switch(h(a,this.secondToLastVertex)||(this.secondToLastVertex=a),this._processCursor(this.cursorVertex),e.type){case`vertex-add`:this.emit(e.type,{...e,added:n,vertices:t});break;case`vertex-update`:this.emit(e.type,{...e,updated:n,vertices:t});break;case`vertex-remove`:this.emit(e.type,{...e,removed:n,vertices:t})}}));let u=this._manipulator=new y({consumesClicks:!1,grabbableForEvent:e=>this.drawingMode!==`click`||e.pointerType===`touch`&&this._snappingEnabled&&this._pointerDownStates.size===1});this.manipulators.add(u),u.grabbable=e!==`point`&&e!==`multipoint`,this.addHandles([u.events.on(`immediate-click`,e=>this._onImmediateClick(e)),u.events.on(`immediate-double-click`,e=>this._onImmediateDoubleClick(e)),c(()=>this.drawingMode,()=>{this.removeHandles(R),this.addHandles(this._createManipulatorDragPipeline(u),R)},l),c(()=>({effectiveCursor:this.effectiveCursor}),({effectiveCursor:e})=>{u.cursor=e},l)]),F(this,()=>{let e=this.view.inputManager.latestPointerInfo?.type??`mouse`,t=this._getSnappingContext(e);if(this.snappingManager!=null){let e=this._snappingOperation.snapAgainNearPreviousMapPoint(this.snappingManager,t);this._updatingHandles.consumePromise(o(e))}})}destroy(){i(this.segmentLabels),i(this._snappingOperation),this._editGeometryOperations=i(this._editGeometryOperations),this._updatingHandles.destroy()}get _isDragging(){let{_stagedPointerId:e,_manipulator:t}=this;return e!=null&&this._pointerDownStates.has(e)||t.grabbing||!t.interactive}get _snappingEnabled(){return this.snappingManager!=null&&this.snappingManager.options.effectiveEnabled}get _requiresScenePoint(){let e=this._updateAndGetEffectiveDrawSurface();return this.view.type===`3d`&&this.drawSurface!==e}get canRedo(){return this._editGeometryOperations.canRedo}get canUndo(){return this._editGeometryOperations.canUndo}get committedVertices(){return this._activePart.vertices.map(e=>this.coordinateHelper.vectorToArray(e.pos))}get _constraint(){let{constraints:e,constraintsEnabled:t}=this;if(e&&t)switch(this.geometryType){case`point`:case`multipoint`:return this._getPointConstraint(e);case`polygon`:case`polyline`:return this._getPolylineOrPolygonConstraint(this.lastVertex,this.secondToLastVertex,e)}}set drawingMode(e){this._set(`drawingMode`,e??v)}get effectiveCursor(){return this.loading?L:this._hideDefaultCursor?null:this.cursor||I}get interactive(){return this._manipulator.interactive}set interactive(e){this._manipulator.interactive=e}get isCompleted(){return this._createOperationCompleted}get numCommittedVertices(){return this._activePart.vertices.length}get snappingOptions(){return this.snappingManager==null?null:this.snappingManager.options}get spatialReference(){return this._get(`spatialReference`)??this.view.spatialReference}get cursorVertex(){return this._get(`cursorVertex`)}get visualizationCursorVertex(){return this._stagedPointerType===`mouse`?this.cursorVertex:null}get committableVertex(){let{cursorVertex:e,lastVertex:t,firstVertex:n,geometryType:r}=this;return r===`polygon`&&g(e,n)||g(e,t)?null:e}get updating(){return this.loading||this._updatingHandles.updating||!!this.segmentLabels?.updating}get geometryIncludingUncommittedVertices(){let{committedVertices:e,committableVertex:t,coordinateHelper:n}=this,r=e.slice();return t!=null&&r.push(n.pointToArray(t)),r}cancel(){this.complete({aborted:!0})}commitStagedVertex(){this._snappingOperation.abort();let{committableVertex:e}=this;e!=null&&this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(e),this._activePart)}complete(e){let t=e?.aborted||!1;this._snappingOperation.abort(),this.snappingManager?.doneSnapping();let{geometryType:n,numCommittedVertices:r}=this,i=n===`multipoint`&&r===0||n===`polyline`&&r<2||n===`polygon`&&r<3;(n===`segment`||n===`point`)&&this.commitStagedVertex(),this._createOperationCompleted=!i,(this.isCompleted||t)&&(this._stagedScreenPoint=null,this._stagedPointerId=null,this._stagedPointerType=null,this._processCursor(null),this.emit(`complete`,{vertices:this.committedVertices.map((e,t)=>({componentIndex:0,vertexIndex:t,coordinates:e})),aborted:t,type:`complete`}))}onInputEvent(e){switch(e.type){case`pointer-down`:this._pointerDownStates.add(e.pointerId);break;case`pointer-up`:this._pointerDownStates.delete(e.pointerId)}switch(e.type){case`pointer-move`:return this._onPointerMove(e);case`hold`:return this._onHold(e)}}redo(){this._editGeometryOperations.redo()}undo(){this.snappingManager!=null&&this.snappingManager.doneSnapping(),this._editGeometryOperations.undo()}_processCursor(e){let t=n(this.cursorVertex),r=n(e),i=r&&(this._updateAndGetEffectiveDrawSurface()?.constrainZ(r)??r),a=this._snapToClosingVertex(i),o=this._applyConstraints(a);g(t,o)||(this._set(`cursorVertex`,o),this.segmentLabels?.set(`stagedVertex`,o==null?null:this.coordinateHelper.pointToVector(o)),o==null||this._stagedPointerType!==`mouse`?this.emit(`cursor-remove`):this.emit(`cursor-update`,{updated:null,vertices:[{componentIndex:0,vertexIndex:this._activePart.vertices.length,coordinates:this.coordinateHelper.pointToArray(o)}],operation:`apply`,type:`vertex-update`}))}_snapToClosingVertex(e){if(e==null||this._isDragging||this.geometryType!==`polygon`||this.numCommittedVertices<=2)return e;let t=this._mapToScreen(e);if(!t)return e;let n=this._activePart;return this._vertexWithinPointerDistance(n.vertices[0].pos,t)?this.firstVertex:this._vertexWithinPointerDistance(n.vertices.at(-1).pos,t)?this.lastVertex:e}_createManipulatorDragPipeline(e){switch(this.drawingMode){case`click`:return this._createManipulatorDragPipelineClick(e);case`freehand`:return this._createManipulatorDragPipelineFreehand(e);case`hybrid`:return this._createManipulatorDragPipelineHybrid(e)}}_createManipulatorDragPipelineClick(e){return x(e,(e,t,n,r)=>{let i=r===`touch`&&this._snappingEnabled;if(this.isCompleted||!i)return;let{snappingStep:a,cancelSnapping:o}=N({predicate:()=>i,snappingManager:this.snappingManager,snappingContext:new M({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,feature:this.graphic,pointer:r,visualizer:this.snappingVisualizer,drawConstraints:this.constraints}),updatingHandles:this._updatingHandles,useZ:!this._requiresScenePoint});n.next(e=>(i&&this.snappingManager!=null&&this.snappingManager.doneSnapping(),e)).next(o),t.next(this._screenToMapDragEventStep()).next(e=>(e.action===`start`&&(this._processCursor(e.mapStart),(this.geometryType===`segment`||i&&!this.numCommittedVertices)&&this.commitStagedVertex()),e)).next(S(this.view,this.elevationInfo)).next(...a).next(e=>(i&&(this._processCursor(e.mapEnd),e.action===`end`&&this.commitStagedVertex()),e)).next(e=>(e.action===`end`&&(this._stagedPointerType!==`mouse`&&this._snappingOperation.abort(),(this.geometryType===`segment`||this.geometryType===`point`)&&this.complete()),e))})}_createManipulatorDragPipelineFreehand(e){return x(e,(e,t)=>{this.isCompleted||t.next(this._screenToMapDragEventStep()).next(e=>(e.action===`start`&&(this._snappingOperation.abort(),this.committableVertex??this._processCursor(e.mapStart),this.geometryType===`segment`&&this.commitStagedVertex()),e)).next(e=>{switch(e.action){case`start`:case`update`:this._processCursor(e.mapEnd),(this.geometryType===`polygon`||this.geometryType===`polyline`)&&this.commitStagedVertex();break;case`end`:this.complete()}return e})})}_createManipulatorDragPipelineHybrid(e){return x(e,(e,t)=>{this.isCompleted||t.next(this._screenToMapDragEventStep()).next(e=>(e.action===`start`&&(this._snappingOperation.abort(),this.addHandles(this._editGeometryOperations.createUndoGroup(),z),this._processCursor(e.mapStart),this.commitStagedVertex()),e)).next(e=>{switch(e.action){case`start`:case`update`:this._processCursor(e.mapEnd),(this.geometryType===`polygon`||this.geometryType===`polyline`)&&this.commitStagedVertex();break;case`end`:this._stagedPointerType!==`mouse`&&this._snappingOperation.abort(),this.removeHandles(z),(this.geometryType===`segment`||this.geometryType===`point`)&&this.complete()}return e})})}get _drawAtFixedElevation(){let{constraintsEnabled:e,constraintZ:t,geometryType:n,numCommittedVertices:r}=this;return e?t!=null||n===`segment`&&r>0:(n===`segment`||n===`polygon`)&&r>0}_updateAndGetEffectiveDrawSurface(){let{constraintsEnabled:e,coordinateHelper:t,drawSurface:n,elevationDrawSurface:r,snapToSceneEnabled:i}=this;if(r==null)return n;if(!this.hasZ)return r.defaultZ=null,r;let a=this.elevationInfo?.mode,o=this.defaultZ,s=e||a===`absolute-height`;return i!=null&&(s=i),a===`on-the-ground`&&(s=!1),this._drawAtFixedElevation&&(o=(e?this.constraintZ:null)??t.getZ(this._activePart.vertices[0].pos),s=!1),s?n:(r.defaultZ=o,r)}_mapToScreen(e){return this._updateAndGetEffectiveDrawSurface()?.mapToScreen(e)}_onHold(e){this._snappingOperation.abort(),this.drawingMode===`click`&&e.pointerType===`touch`&&this._snappingEnabled&&this._processCursor(e.mapPoint),e.stopPropagation()}_onImmediateClick(e){if(!(e.pointerType===`mouse`&&e.button===2||this._manipulator.dragging))try{let{drawingMode:t,geometryType:n}=this;this._stagedPointerType=e.pointerType,this._stagedScreenPoint=e.screenPoint;let r=this._screenToMap(e.screenPoint);if(r==null||r==null||t===`freehand`&&n!==`point`&&n!==`multipoint`)return;if(this._snappingEnabled&&this.cursorVertex!=null||this._processCursor(r),this.committableVertex==null){this.complete();return}this.commitStagedVertex(),e.pointerType!==`mouse`&&this._processCursor(null),(t===`freehand`&&this.geometryType!==`multipoint`||n===`point`||n===`segment`&&this.numCommittedVertices===2||n===`segment`&&t===`hybrid`&&this.numCommittedVertices===1)&&this.complete()}finally{e.stopPropagation()}}_onImmediateDoubleClick(e){this._manipulator.dragging||this.geometryType===`point`||(this.complete(),e.stopPropagation())}_onPointerMove(e){let t=u(e.x,e.y);this._updatePointer(t,e.pointerId,e.pointerType)&&e.stopPropagation()}_updatePointer(e,t,n){return this._stagedScreenPoint=e,this._stagedPointerType=n,this._stagedPointerId=t,this._isDragging?(this._snappingOperation.abort(),!1):(this._processCursorMovementRelativeToSurface(e,n),!0)}_onKeyboardBasedChange(){this._stagedPointerType!==`mouse`||!this._stagedScreenPoint||this._stagedPointerId==null||this._isDragging?this._snappingOperation.abort():this._processCursorMovementRelativeToSurface(this._stagedScreenPoint,this._stagedPointerType)}_processCursorMovementRelativeToSurface(e,t){let n=this._snappingOperation,r=this._screenToMap(e),i=this._requiresScenePoint?this.drawSurface?.screenToMap(e):null;if(r==null){this._hideDefaultCursor=!0,this._processCursor(null),n.abort();return}this._hideDefaultCursor=!1;let a=this.snappingManager;if(a==null){this._processCursor(r),n.abort();return}let s=this._getSnappingContext(t);this._updatingHandles.consumePromise(o(n.snap({point:r,scenePoint:i},a,s)))}_applyConstraints(e){let{_constraint:t,constraints:n}=this;if(!e||!n||!t)return e;let{context:r}=n,i=k(e,r),a=i?t.closestTo(i):void 0;if(!a)return e;let o=A(a,e,r),s=this.view.type===`2d`||r.elevationInfo.mode!==`absolute-height`;return o!=null&&s&&this.constraintZ!=null&&this.hasZ&&(o.z=this.constraintZ),o}_screenToMap(e){return e?this._updateAndGetEffectiveDrawSurface()?.screenToMap(e):null}_screenToMapDragEventStep(){let e=null;return t=>{if(t.action===`start`&&(e=this._screenToMap(t.screenStart)),e==null)return null;let n=this._screenToMap(t.screenEnd);return n==null?null:{...t,mapStart:e,mapEnd:n}}}_vertexWithinPointerDistance(e,t){let n=this._mapToScreen(this.coordinateHelper.vectorToDehydratedPoint(e));return n!=null&&V(n,t,25)}_getSnappingContext(e){let t=this._drawAtFixedElevation?this.elevationDrawSurface?.defaultZ:null;return new M({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:e,feature:this.graphic,visualizer:this.snappingVisualizer,selfSnappingZ:t==null?null:{value:t,elevationInfo:this.elevationInfo},drawConstraints:this.constraints})}};e([d()],B.prototype,`_hideDefaultCursor`,void 0),e([d()],B.prototype,`_stagedPointerId`,void 0),e([d()],B.prototype,`_isDragging`,null),e([d()],B.prototype,`_snappingOperation`,void 0),e([d()],B.prototype,`_snappingEnabled`,null),e([d({constructOnly:!0})],B.prototype,`graphic`,void 0),e([d()],B.prototype,`constraintsEnabled`,void 0),e([d()],B.prototype,`constraints`,void 0),e([d()],B.prototype,`_constraint`,null),e([d()],B.prototype,`constraintZ`,void 0),e([d()],B.prototype,`defaultZ`,void 0),e([d()],B.prototype,`isDraped`,void 0),e([d({value:v})],B.prototype,`drawingMode`,null),e([d({constructOnly:!0})],B.prototype,`elevationDrawSurface`,void 0),e([d({constructOnly:!0})],B.prototype,`elevationInfo`,void 0),e([d({constructOnly:!0,type:j})],B.prototype,`labelOptions`,void 0),e([d({constructOnly:!0})],B.prototype,`geometryType`,void 0),e([d({constructOnly:!0})],B.prototype,`hasM`,void 0),e([d({constructOnly:!0})],B.prototype,`hasZ`,void 0),e([d()],B.prototype,`cursor`,void 0),e([d()],B.prototype,`effectiveCursor`,null),e([d()],B.prototype,`loading`,void 0),e([d({constructOnly:!0})],B.prototype,`manipulators`,void 0),e([d({constructOnly:!0})],B.prototype,`drawSurface`,void 0),e([d({constructOnly:!0})],B.prototype,`segmentLabels`,void 0),e([d({constructOnly:!0})],B.prototype,`snappingManager`,void 0),e([d({constructOnly:!0})],B.prototype,`snappingVisualizer`,void 0),e([d()],B.prototype,`snapToSceneEnabled`,void 0),e([d({constructOnly:!0})],B.prototype,`spatialReference`,null),e([d({readOnly:!0})],B.prototype,`cursorVertex`,null),e([d({readOnly:!0})],B.prototype,`visualizationCursorVertex`,null),e([d()],B.prototype,`committableVertex`,null),e([d()],B.prototype,`firstVertex`,void 0),e([d()],B.prototype,`lastVertex`,void 0),e([d()],B.prototype,`secondToLastVertex`,void 0),e([d()],B.prototype,`updating`,null),e([d({constructOnly:!0})],B.prototype,`view`,void 0),B=e([f(`esri.views.draw.DrawOperation`)],B);function V(e,t,n){let r=e.x-t.x,i=e.y-t.y;return r*r+i*i<=n}export{B as DrawOperation,I as defaultCursor,L as defaultLoadingCursor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{makeHandle as t}from"../../core/handleUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{IDENTITY as a}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{DrawOperation as o}from"./DrawOperation.js";import{ScreenDrawSurface as s}from"./drawSurfaces.js";import{createCircle as c,createSquare as l,createEllipse as u,createRectangle as d}from"./support/createUtils.js";import{AffineCoordinateSystem as f}from"./support/surfaceCoordinateSystems.js";import{InteractiveToolBase as p}from"../interactive/InteractiveToolBase.js";import m from"../overlay/OutlineOverlayItem.js";let h=class extends p{constructor(e){super(e),this.drawOperation=null,this._overlayItem=void 0,this.geometryType=null,this.mode=null,this.type=`draw-screen`}initialize(){this.drawOperation=this._makeDrawOperation();let e=e=>this.drawOperation?.on(e,t=>{this._updateVisuals(),this.emit(e,t)})??t();this.addHandles([e(`vertex-add`),e(`vertex-remove`),e(`vertex-update`),e(`cursor-update`),e(`complete`)]),this.finishToolCreation()}destroy(){this.drawOperation=n(this.drawOperation),this._set(`view`,null)}get canRedo(){return!!this.drawOperation?.canRedo}get canUndo(){return!!this.drawOperation?.canUndo}set centeredToggled(e){this._set(`centeredToggled`,e),this._updateVisuals()}set enabled(e){let{drawOperation:t}=this;t&&(t.interactive=e),this._set(`enabled`,e)}set uniformSizeToggled(e){this._set(`uniformSizeToggled`,e),this._updateVisuals()}get updating(){return this.drawOperation?.updating??!1}get cursor(){return this._get(`cursor`)??`crosshair`}set cursor(e){this._set(`cursor`,e);let{drawOperation:t}=this;t&&(t.cursor=e)}completeCreateOperation(){this.drawOperation?.complete()}onInputEvent(e){this.destroyed||this.drawOperation?.onInputEvent(e)}redo(){this.drawOperation?.redo()}undo(){this.drawOperation?.undo()}reset(){}_makeDrawOperation(){let{view:e}=this;return new o({view:e,manipulators:this.manipulators,geometryType:g(this.geometryType),drawingMode:this.mode,hasZ:!1,defaultZ:0,snapToSceneEnabled:!1,drawSurface:new s,hasM:!1,snappingManager:null,snappingVisualizer:null,graphic:null,cursor:this.cursor})}get coordinates(){let{drawOperation:e}=this;if(!e?.geometryIncludingUncommittedVertices.length)return[];let{coordinateHelper:t}=e,n=e.committableVertex,r=e.committedVertices.slice();n!=null&&r.push(t.pointToArray(n));let i=r.length;switch(this.geometryType){case`point`:return r.slice(0,1);case`circle`:case`rectangle`:{let t=new f(a,s.spatialReference),n=this.geometryType===`circle`?c:l,o=this.geometryType===`circle`?u:d;if(i===1&&e.isCompleted){let e=r[0];return n([e,t.makeMapPoint(e[0]+_,e[1])],t,!0)?.geometry.rings[0]??[]}if(i===2){let e=this.geometryType!==`rectangle`,i=this.centeredToggled!==e,a=this.geometryType!==`rectangle`;return(this.uniformSizeToggled===a?o(r,t,i)?.geometry.rings[0]:n(r,t,i)?.geometry.rings[0])??[]}return[]}}return r}_updateVisuals(){if(!this._overlayItem){let e=new m({strokeDash:[5],strokeDashColor:[255,255,255,255]});this.view.overlay?.addItem(e),this.addHandles(t(()=>{this.view.overlay?.removeItem(e),e?.destroy(),this._overlayItem=void 0})),this._overlayItem=e}this._overlayItem.coordinates=this.coordinates}onDeactivate(){this.drawOperation?.isCompleted||this.drawOperation?.cancel()}};e([r({value:!1})],h.prototype,`centeredToggled`,null),e([r()],h.prototype,`drawOperation`,void 0),e([r({value:!0})],h.prototype,`enabled`,null),e([r({value:!1})],h.prototype,`uniformSizeToggled`,null),e([r({constructOnly:!0})],h.prototype,`geometryType`,void 0),e([r({constructOnly:!0})],h.prototype,`mode`,void 0),e([r({readOnly:!0})],h.prototype,`type`,void 0),e([r({readOnly:!0})],h.prototype,`updating`,null),e([r({constructOnly:!0,nonNullable:!0})],h.prototype,`view`,void 0),e([r()],h.prototype,`cursor`,null),h=e([i(`esri.views.draw.DrawScreenTool`)],h);function g(e){switch(e){case`polygon`:case`point`:return e;case`circle`:case`rectangle`:return`segment`}}const _=48;export{h as DrawScreenTool,g as geometryTypeToDrawOperationGeometryType};
|
|
2
|
+
import{__decorate as e}from"tslib";import{makeHandle as t}from"../../core/handleUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{IDENTITY as a}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{DrawOperation as o}from"./DrawOperation.js";import{ScreenDrawSurface as s}from"./drawSurfaces.js";import{createCircle as c,createSquare as l,createEllipse as u,createRectangle as d}from"./support/createUtils.js";import{AffineCoordinateSystem as f}from"./support/surfaceCoordinateSystems.js";import{InteractiveToolBase as p}from"../interactive/InteractiveToolBase.js";import m from"../overlay/OutlineOverlayItem.js";let h=class extends p{constructor(e){super(e),this.drawOperation=null,this._overlayItem=void 0,this.geometryType=null,this.mode=null,this.type=`draw-screen`}initialize(){this.drawOperation=this._makeDrawOperation();let e=e=>this.drawOperation?.on(e,t=>{this._updateVisuals(),this.emit(e,t)})??t();this.addHandles([e(`vertex-add`),e(`vertex-remove`),e(`vertex-update`),e(`cursor-update`),e(`complete`)]),this.finishToolCreation()}destroy(){this.drawOperation=n(this.drawOperation),this._set(`view`,null)}get canRedo(){return!!this.drawOperation?.canRedo}get canUndo(){return!!this.drawOperation?.canUndo}set centeredToggled(e){this._set(`centeredToggled`,e),this._updateVisuals()}set enabled(e){let{drawOperation:t}=this;t&&(t.interactive=e),this._set(`enabled`,e)}set uniformSizeToggled(e){this._set(`uniformSizeToggled`,e),this._updateVisuals()}get updating(){return this.drawOperation?.updating??!1}get cursor(){return this._get(`cursor`)??`crosshair`}set cursor(e){this._set(`cursor`,e);let{drawOperation:t}=this;t&&(t.cursor=e)}completeCreateOperation(){this.drawOperation?.complete()}onInputEvent(e){this.destroyed||this.drawOperation?.onInputEvent(e)}redo(){this.drawOperation?.redo()}undo(){this.drawOperation?.undo()}reset(){}_makeDrawOperation(){let{view:e}=this;return new o({view:e,manipulators:this.manipulators,geometryType:g(this.geometryType),drawingMode:this.mode,hasZ:!1,defaultZ:0,snapToSceneEnabled:!1,drawSurface:new s,spatialReference:s.spatialReference,hasM:!1,snappingManager:null,snappingVisualizer:null,graphic:null,cursor:this.cursor})}get coordinates(){let{drawOperation:e}=this;if(!e?.geometryIncludingUncommittedVertices.length)return[];let{coordinateHelper:t}=e,n=e.committableVertex,r=e.committedVertices.slice();n!=null&&r.push(t.pointToArray(n));let i=r.length;switch(this.geometryType){case`point`:return r.slice(0,1);case`circle`:case`rectangle`:{let t=new f(a,s.spatialReference),n=this.geometryType===`circle`?c:l,o=this.geometryType===`circle`?u:d;if(i===1&&e.isCompleted){let e=r[0];return n([e,t.makeMapPoint(e[0]+_,e[1])],t,!0)?.geometry.rings[0]??[]}if(i===2){let e=this.geometryType!==`rectangle`,i=this.centeredToggled!==e,a=this.geometryType!==`rectangle`;return(this.uniformSizeToggled===a?o(r,t,i)?.geometry.rings[0]:n(r,t,i)?.geometry.rings[0])??[]}return[]}}return r}_updateVisuals(){if(!this._overlayItem){let e=new m({strokeDash:[5],strokeDashColor:[255,255,255,255]});this.view.overlay?.addItem(e),this.addHandles(t(()=>{this.view.overlay?.removeItem(e),e?.destroy(),this._overlayItem=void 0})),this._overlayItem=e}this._overlayItem.coordinates=this.coordinates}onDeactivate(){this.drawOperation?.isCompleted||this.drawOperation?.cancel()}};e([r({value:!1})],h.prototype,`centeredToggled`,null),e([r()],h.prototype,`drawOperation`,void 0),e([r({value:!0})],h.prototype,`enabled`,null),e([r({value:!1})],h.prototype,`uniformSizeToggled`,null),e([r({constructOnly:!0})],h.prototype,`geometryType`,void 0),e([r({constructOnly:!0})],h.prototype,`mode`,void 0),e([r({readOnly:!0})],h.prototype,`type`,void 0),e([r({readOnly:!0})],h.prototype,`updating`,null),e([r({constructOnly:!0,nonNullable:!0})],h.prototype,`view`,void 0),e([r()],h.prototype,`cursor`,null),h=e([i(`esri.views.draw.DrawScreenTool`)],h);function g(e){switch(e){case`polygon`:case`point`:return e;case`circle`:case`rectangle`:return`segment`}}const _=48;export{h as DrawScreenTool,g as geometryTypeToDrawOperationGeometryType};
|
package/views/input/types.d.ts
CHANGED
|
@@ -1061,12 +1061,10 @@ export interface ViewEventTypes extends ViewBaseEventTypes {
|
|
|
1061
1061
|
* ```js
|
|
1062
1062
|
* reactiveUtils.on(() => view,
|
|
1063
1063
|
* "focus-region-select",
|
|
1064
|
-
* async (
|
|
1064
|
+
* async () => {
|
|
1065
1065
|
* const focusRegion = view.focusRegion;
|
|
1066
1066
|
* // fetch the features for the focus region
|
|
1067
|
-
* const generator =
|
|
1068
|
-
* pointerType: event.pointerType,
|
|
1069
|
-
* });
|
|
1067
|
+
* const generator = view.fetchPopupFeatures(focusRegion);
|
|
1070
1068
|
* // convert the async generator to an array of features and process them
|
|
1071
1069
|
* const features = await Array.fromAsync(generator);
|
|
1072
1070
|
* });
|
|
@@ -29,7 +29,7 @@ export interface LabelOptionsProperties extends Partial<Pick<LabelOptions, "enab
|
|
|
29
29
|
* // Create a PortalItem instance for the map used in the 3D view
|
|
30
30
|
* view.map.portalItem = new PortalItem({
|
|
31
31
|
* portal: {
|
|
32
|
-
* units: "english" //or "metric"
|
|
32
|
+
* units: "english" // or "metric"
|
|
33
33
|
* },
|
|
34
34
|
* });
|
|
35
35
|
* ```
|
|
@@ -38,16 +38,16 @@ export interface LabelOptionsProperties extends Partial<Pick<LabelOptions, "enab
|
|
|
38
38
|
*
|
|
39
39
|
* ```js
|
|
40
40
|
* // Set the units directly on an existing PortalItem of the 3D view
|
|
41
|
-
* view.map.portalItem.portal.units = "english" //or "metric"
|
|
41
|
+
* view.map.portalItem.portal.units = "english" // or "metric"
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
|
-
*
|
|
44
|
+
* Alternatively, if no [Portal](https://developers.arcgis.com/javascript/latest/references/core/portal/Portal/) exists, you can set the [Portal.units](https://developers.arcgis.com/javascript/latest/references/core/portal/Portal/#units) property
|
|
45
45
|
* from a new default `Portal` created using the [Portal.getDefault()](https://developers.arcgis.com/javascript/latest/references/core/portal/Portal/#getDefault) method.
|
|
46
46
|
*
|
|
47
47
|
* ```js
|
|
48
|
-
* // Create
|
|
48
|
+
* // Create a new Portal instance and set its units
|
|
49
49
|
* const portal = Portal.getDefault();
|
|
50
|
-
* portal.units = "english" //or "metric"
|
|
50
|
+
* portal.units = "english" // or "metric"
|
|
51
51
|
* ```
|
|
52
52
|
*
|
|
53
53
|
* </details>
|
|
@@ -74,8 +74,8 @@ export interface SnappingOptionsProperties extends Partial<Pick<SnappingOptions,
|
|
|
74
74
|
* @see [Sample - Editor widget with configurations](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-configurable/)
|
|
75
75
|
* @see [Sample - Snapping with Sketch widget and Magnifier](https://developers.arcgis.com/javascript/latest/sample-code/sketch-snapping-magnifier/)
|
|
76
76
|
* @example
|
|
77
|
-
* // Create a new instance of Sketch, and
|
|
78
|
-
* // a layer
|
|
77
|
+
* // Create a new instance of Sketch, and
|
|
78
|
+
* // specify a layer in featureSources.
|
|
79
79
|
* // This enables feature snapping on that layer.
|
|
80
80
|
* const sketch = new Sketch({
|
|
81
81
|
* layer: graphicsLayer,
|
|
@@ -6,6 +6,7 @@ import type { SnappingControlsVisibleElementsProperties } from "../support/Snapp
|
|
|
6
6
|
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "createFeaturesSection" | "editFeaturesSection" | "flow" | "labelsToggle" | "mergeButton" | "selectionToolbar" | "settingsMenu" | "sketch" | "snappingControls" | "splitButton" | "tooltipsToggle" | "undoRedoButtons" | "zoomToButton">> {
|
|
7
7
|
/**
|
|
8
8
|
* The available [SnappingControls](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SnappingControls/) elements within the widget.
|
|
9
|
+
* These visibility properties are preserved but ignored while [Editor.useViewOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#useViewOptions) is `true`.
|
|
9
10
|
*
|
|
10
11
|
* @since 5.0
|
|
11
12
|
*/
|
|
@@ -92,6 +93,7 @@ export default class VisibleElements extends Accessor {
|
|
|
92
93
|
accessor sketch: boolean;
|
|
93
94
|
/**
|
|
94
95
|
* Indicates whether to display the `SnappingControls` widget. Default is `true`.
|
|
96
|
+
* This property is preserved but ignored while [Editor.useViewOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#useViewOptions) is `true`.
|
|
95
97
|
*
|
|
96
98
|
* @default true
|
|
97
99
|
* @since 5.0
|
|
@@ -99,6 +101,7 @@ export default class VisibleElements extends Accessor {
|
|
|
99
101
|
accessor snappingControls: boolean;
|
|
100
102
|
/**
|
|
101
103
|
* The available [SnappingControls](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SnappingControls/) elements within the widget.
|
|
104
|
+
* These visibility properties are preserved but ignored while [Editor.useViewOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#useViewOptions) is `true`.
|
|
102
105
|
*
|
|
103
106
|
* @since 5.0
|
|
104
107
|
*/
|
|
@@ -113,6 +116,7 @@ export default class VisibleElements extends Accessor {
|
|
|
113
116
|
accessor splitButton: boolean;
|
|
114
117
|
/**
|
|
115
118
|
* Indicates whether to display the tooltips toggle. Default value is `true`.
|
|
119
|
+
* This property is preserved but ignored while [Editor.useViewOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#useViewOptions) is `true`.
|
|
116
120
|
*
|
|
117
121
|
* @default true
|
|
118
122
|
* @since 5.0
|
package/widgets/Editor.d.ts
CHANGED
|
@@ -590,6 +590,8 @@ export default class Editor extends Widget {
|
|
|
590
590
|
* - Snapping and tooltip options are inherited from the view. The widget's
|
|
591
591
|
* [snappingOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#snappingOptions) and [tooltipOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#tooltipOptions) are preserved but ignored.
|
|
592
592
|
* - Snapping controls and the tooltip toggle are hidden from the widget's Settings menu.
|
|
593
|
+
* The [VisibleElements.snappingControls](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/VisibleElements/#snappingControls), [VisibleElements.snappingControlsElements](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/VisibleElements/#snappingControlsElements),
|
|
594
|
+
* and [VisibleElements.tooltipsToggle](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/VisibleElements/#tooltipsToggle) visibility properties are preserved but ignored.
|
|
593
595
|
* - Units set through [valueOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#valueOptions) override the corresponding units on the view,
|
|
594
596
|
* such as length or area, without changing the view's options. Setting a unit to `null` or `undefined` restores
|
|
595
597
|
* inheritance for that measurement type.
|