@arcgis/core 5.2.0-next.124 → 5.2.0-next.125
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/arcade/functions/string.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{83c7c4218bc6ba2f16ee.js → 0a4a5ed831a4e4d8e0fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{e4e1db4e9e5f13167401.js → 0f8ff964461cf8e0673b.js} +1 -1
- package/assets/esri/core/workers/chunks/{9e5b30b907102bc0c201.js → 0fba5c0e89b057da548d.js} +1 -1
- package/assets/esri/core/workers/chunks/{064445e6f9512817ac87.js → 12b5a645c0987a0efe54.js} +2 -2
- package/assets/esri/core/workers/chunks/168b45c5d8233f23793e.js +2 -0
- package/assets/esri/core/workers/chunks/{ce08e3369641da0d7a27.js → 1dbb3e25e005a8220779.js} +2 -2
- package/assets/esri/core/workers/chunks/{eb7f45736c852725b0bb.js → 1f55701d23a5e5a0c70c.js} +1 -1
- package/assets/esri/core/workers/chunks/{c39ebd8d469f1e8bb61e.js → 25e212fe9a2ea37c9e81.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3ab53b534e2872131be.js → 2a34760b3f0c134898ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{216d8cb86548e92a8196.js → 2e3fd81653dc0d86456c.js} +1 -1
- package/assets/esri/core/workers/chunks/378bdb4e5cd1ebada1f4.js +1 -0
- package/assets/esri/core/workers/chunks/3a40146568e6dd0b1828.js +1 -0
- package/assets/esri/core/workers/chunks/{23279303cd7698314c56.js → 3b4ceaf21be540cb3499.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3d48401462ef3bf0ad9.js → 3f082329a544c2c1d62d.js} +1 -1
- package/assets/esri/core/workers/chunks/{45d87af48a21644590c2.js → 4716693eca44e8f89f5c.js} +1 -1
- package/assets/esri/core/workers/chunks/{39985c51465b79ff0910.js → 4f7e8e4ddf52b5245ea4.js} +1 -1
- package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +1 -0
- package/assets/esri/core/workers/chunks/{78c1b75b1a8937eaa3cd.js → 5b9b76e180cf206a8a0c.js} +1 -1
- package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +1 -0
- package/assets/esri/core/workers/chunks/{2f829321bfbd3bacd64f.js → 6c4def0faaef861a09c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c38ce72160d5a4e4b3d.js → 6cf34cfdd063a1b6fe3e.js} +1 -1
- package/assets/esri/core/workers/chunks/6e8187a77846239ed112.js +2 -0
- package/assets/esri/core/workers/chunks/{52744dfd430cd0c0edfb.js → 78abd6c42f39e6f6ffbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{5993db944b9e7825e0bc.js → 7926faab76a721a2e1c4.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc0816f064be576a2fa6.js → 7fcee3a1b900ddc9a5e3.js} +1 -1
- package/assets/esri/core/workers/chunks/8190fcb1dd10ad20feed.js +1 -0
- package/assets/esri/core/workers/chunks/84db05e872dbf35c80a2.js +1 -0
- package/assets/esri/core/workers/chunks/85739ed6af0f0a3cb302.js +1 -0
- package/assets/esri/core/workers/chunks/{c3008b20cb5fd38bd900.js → 8a8e94b5d7d153361b0b.js} +1 -1
- package/assets/esri/core/workers/chunks/923c45ebcf45d9ce8ae0.js +1 -0
- package/assets/esri/core/workers/chunks/{8984d02c0ce828fd223a.js → a7ce5b958dfeb240c4a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{770ca70d363184e39d60.js → ab8a1140bf31f46f8ebf.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc923e50958b68a50014.js → b96358d475dc98034aa4.js} +1 -1
- package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +1 -0
- package/assets/esri/core/workers/chunks/{b22de8bf4a4a739bc36d.js → bbaaebe1774a22dba39b.js} +1 -1
- package/assets/esri/core/workers/chunks/{58a17fb3c0dd07c63d57.js → cfaba0470619786e1ef8.js} +2 -2
- package/assets/esri/core/workers/chunks/{97cd4145c016cf379120.js → cfd56e0a716baf95e17b.js} +1 -1
- package/assets/esri/core/workers/chunks/e35eb93c0fb1f6de8db0.js +1 -0
- package/assets/esri/core/workers/chunks/{20e4277a4a6c57957202.js → f05becec0952a61bc654.js} +1 -1
- package/assets/esri/core/workers/chunks/{59cd139712d919e6a738.js → f0901f9c7135b708434f.js} +1 -1
- package/assets/esri/core/workers/chunks/f4572ad25712d204f258.js +1 -0
- package/assets/esri/core/workers/chunks/{eb780f2dafa14f776166.js → f71ec8a260405ed07958.js} +1 -1
- package/assets/esri/core/workers/chunks/{781fa83e8063b8f685dc.js → fe9582bc2244667e40ab.js} +1 -1
- package/assets/esri/themes/base/_FocusRegionOverlayItem.scss +18 -0
- package/assets/esri/themes/base/_View.scss +4 -0
- package/assets/esri/themes/base/_core.scss +1 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -0
- 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/Editor/t9n/messages.en.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-TW.json +1 -1
- package/chunks/GaussianSplatColorComposition.glsl.js +2 -0
- package/chunks/GaussianSplatEmissionComposition.glsl.js +11 -0
- package/chunks/earcut.js +1 -1
- package/chunks/portal.js +1 -1
- package/config.js +1 -1
- package/graphic/MapImageGraphicOrigin.js +1 -1
- package/graphic/TileGraphicOrigin.js +1 -1
- package/interfaces.d.ts +5 -0
- package/kernel.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/TemporalLayer.js +1 -1
- package/layers/support/TimeInfo.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +2 -2
- package/popup/FeatureContentCollection.d.ts +8 -1
- package/popup/FeatureContentCollection.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/gfxUtils.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/time/timeZoneUtils.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +2 -0
- package/views/3d/navigation/Navigation3D.d.ts +7 -0
- package/views/3d/navigation/Navigation3D.js +1 -1
- package/views/3d/navigation/modes/navigationModeUtils.d.ts +32 -0
- package/views/3d/navigation/modes/navigationModeUtils.js +2 -0
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatColorComposition.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatColorCompositionTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js +1 -1
- package/views/3d/webgl-engine/shaders/{GaussianSplatComposition.glsl.js → GaussianSplatEmissionComposition.glsl.js} +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatEmissionCompositionTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/DOMContainer.d.ts +27 -0
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.d.ts +1 -1
- package/views/View.d.ts +10 -1
- package/views/View.js +1 -1
- package/views/input/types.d.ts +46 -0
- package/views/overlay/FocusRegionOverlayItem.js +2 -0
- package/views/webgl/renderState.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -0
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +23 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.d.ts +12 -2
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +11 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/components/Alert.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup/types.d.ts +7 -0
- package/assets/esri/core/workers/chunks/033debcbf6b3683dc4fe.js +0 -2
- package/assets/esri/core/workers/chunks/29ae19206bbeb480be0f.js +0 -1
- package/assets/esri/core/workers/chunks/463d69f596d1d34ef275.js +0 -2
- package/assets/esri/core/workers/chunks/475906b079f4f1ddacf2.js +0 -1
- package/assets/esri/core/workers/chunks/49affbed22e201f7c32b.js +0 -1
- package/assets/esri/core/workers/chunks/4f58e0322707f63f5bf2.js +0 -1
- package/assets/esri/core/workers/chunks/724ea2e2843e6dac0a90.js +0 -1
- package/assets/esri/core/workers/chunks/7ff536284942c5284a16.js +0 -1
- package/assets/esri/core/workers/chunks/8e102a2e134ce6ce0724.js +0 -1
- package/assets/esri/core/workers/chunks/92c852700ad1006f1e76.js +0 -1
- package/assets/esri/core/workers/chunks/ac7af417ebf7721d7400.js +0 -1
- package/assets/esri/core/workers/chunks/bb5ed2a796a45c41b0b4.js +0 -1
- package/assets/esri/core/workers/chunks/d25210574168ead2f813.js +0 -1
- package/chunks/GaussianSplatComposition.glsl.js +0 -22
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +0 -2
- /package/assets/esri/core/workers/chunks/{064445e6f9512817ac87.js.LICENSE.txt → 12b5a645c0987a0efe54.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{033debcbf6b3683dc4fe.js.LICENSE.txt → 168b45c5d8233f23793e.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{463d69f596d1d34ef275.js.LICENSE.txt → 1dbb3e25e005a8220779.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ce08e3369641da0d7a27.js.LICENSE.txt → 6e8187a77846239ed112.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{58a17fb3c0dd07c63d57.js.LICENSE.txt → cfaba0470619786e1ef8.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{schema_definitions as e}from"./definitions.js";const i={title:"Scene Layer config on layer item",type:"object",properties:{layers:{type:"array",items:{properties:{attributeTableInfo:{type:"object",description:"An `attributeTableInfo` object defining how the data will be presented in tabular format.",$ref:"#/definitions/attributeTableInfo_schema.json"},customParameters:{$ref:"#/definitions/customParameters_schema.json"},disablePopup:{type:"boolean",description:"disablePopups allows a client to ignore popups defined by the service item."},id:{type:"integer",description:"ID of the service layer."},layerDefinition:{type:"object",description:"A layerDefinition object defining the attribute schema and drawing information for the layer.",allOf:[{$ref:"#/definitions/layerDefinition_schema.json"},{properties:{definitionExpression:{},drawingInfo:{allOf:[{$ref:"#/definitions/drawingInfo_schema.json"},{properties:{labelingInfo:{},renderer:{},transparency:{}},additionalProperties:!1}]},elevationInfo:{},excludeObjectIds:{},featureReduction:{},floorInfo:{},maxScale:{},minScale:{},polygonFilter:{},rangeInfos:{}},additionalProperties:!1}]},listMode:{type:"string",description:"To show or hide layers in the layer list",enum:["hide","show"],default:"show"},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.",minimum:0,maximum:1,default:1},popupInfo:{description:"A popupInfo object defining the content of pop-up windows when you click or query a feature.",$ref:"#/definitions/popupInfo_schema.json"},screenSizePerspective:{type:"boolean",description:"Apply [perspective scaling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#screenSizePerspectiveEnabled) to screen-size symbols.",default:!0},showLabels:{type:"boolean",description:"If the layer has a labelingInfo property then labels show on the scene only if the showLabels property it true.",default:!1},showLegend:{type:"boolean",description:"Boolean value indicating whether to display the layer in the legend. Default value is `true`.",default:!0},timeAnimation:{type:"boolean",description:"Indicates whether to enable time animation if the layer supports it.",default:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web scene",default:!0},visibilityTimeExtent:{description:"Represents time extent that will control when a layer should be visible based on webscene's current time. Visibility time extent only affects the layer visibility and will not filter the data.",$ref:"#/definitions/timeExtent_schema.json"}},additionalProperties:!1}}},additionalProperties:!1,$schema:"http://json-schema.org/draft-07/schema",definitions:e};export{i as json};
|
|
2
|
+
import{schema_definitions as e}from"./definitions.js";const i={title:"Scene Layer config on layer item",type:"object",properties:{layers:{type:"array",items:{properties:{attributeTableInfo:{type:"object",description:"An `attributeTableInfo` object defining how the data will be presented in tabular format.",$ref:"#/definitions/attributeTableInfo_schema.json"},customParameters:{$ref:"#/definitions/customParameters_schema.json"},disablePopup:{type:"boolean",description:"disablePopups allows a client to ignore popups defined by the service item."},id:{type:"integer",description:"ID of the service layer."},layerDefinition:{type:"object",description:"A layerDefinition object defining the attribute schema and drawing information for the layer.",allOf:[{$ref:"#/definitions/layerDefinition_schema.json"},{properties:{definitionExpression:{},drawingInfo:{allOf:[{$ref:"#/definitions/drawingInfo_schema.json"},{properties:{labelingInfo:{},renderer:{},transparency:{}},additionalProperties:!1}]},elevationInfo:{},excludeObjectIds:{},featureReduction:{},floorInfo:{},maxScale:{},minScale:{},polygonFilter:{},rangeInfos:{}},additionalProperties:!1}]},listMode:{type:"string",description:"To show or hide layers in the layer list",enum:["hide","show"],default:"show"},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.",minimum:0,maximum:1,default:1},popupInfo:{description:"A popupInfo object defining the content of pop-up windows when you click or query a feature.",$ref:"#/definitions/popupInfo_schema.json"},screenSizePerspective:{type:"boolean",description:"Apply [perspective scaling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#screenSizePerspectiveEnabled) to screen-size symbols.",default:!0},showLabels:{type:"boolean",description:"If the layer has a labelingInfo property then labels show on the scene only if the showLabels property it true.",default:!1},showLegend:{type:"boolean",description:"Boolean value indicating whether to display the layer in the legend. Default value is `true`.",default:!0},timeAnimation:{type:"boolean",description:"Indicates whether to enable time animation if the layer supports it. Default value is `true`.",default:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web scene",default:!0},visibilityTimeExtent:{description:"Represents time extent that will control when a layer should be visible based on webscene's current time. Visibility time extent only affects the layer visibility and will not filter the data.",$ref:"#/definitions/timeExtent_schema.json"}},additionalProperties:!1}}},additionalProperties:!1,$schema:"http://json-schema.org/draft-07/schema",definitions:e};export{i as json};
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const a="20260928",d="e77add0f694a6828aaa539d516b22025a0343e94";export{a as buildDate,d as revision};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getAssetUrl as t}from"../../assets.js";import e from"../../Color.js";import o from"../../request.js";import{LRUCache as
|
|
2
|
+
import{getAssetUrl as t}from"../../assets.js";import e from"../../Color.js";import o from"../../request.js";import{LRUCache as r}from"../../core/LRUCache.js";import{pt2px as s}from"../../core/screenUtils.js";import{getCIMSymbolColor as n}from"./cimSymbolUtils.js";const i="picture-fill",l="simple-fill",a="simple-line",c="simple-marker",h="text",d="cim",m=new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),p=new r(1e3);function u(e){const o=e.style;let r=null;if(e)switch(e.type){case c:"cross"!==o&&"x"!==o&&(r=e.color);break;case l:o&&"solid"!==o?"none"!==o&&(r={type:"pattern",x:0,y:0,src:t(`esri/symbols/patterns/${o}.png`),width:5,height:5}):r=e.color;break;case i:r={type:"pattern",src:e.url,width:s(e.width)*e.xscale,height:s(e.height)*e.yscale,x:s(e.xoffset),y:s(e.yoffset)};break;case h:r=e.color;break;case d:r=n(e)}return r}function f(t,e){const r=t+"-"+e,s=p.get(r);return null!=s?Promise.resolve(s):o(t,{responseType:"image"}).then(t=>{const o=t.data,s=o.naturalWidth,n=o.naturalHeight,i=document.createElement("canvas");i.width=s,i.height=n;const l=i.getContext("2d");l.fillStyle=e,l.fillRect(0,0,s,n),l.globalCompositeOperation="destination-in",l.drawImage(o,0,0);const a=i.toDataURL();return p.put(r,a),a})}function y(t){if(!t)return null;let e=null;switch(t.type){case l:case i:case c:e=y(t.outline);break;case a:{const o=s(t.width);null!=t.style&&"none"!==t.style&&0!==o&&(e={color:t.color,style:b(t.style),width:o,cap:t.cap,join:"miter"===t.join?s(t.miterLimit):t.join},e.dashArray=g(e).join(",")||"none");break}default:e=null}return e}function g(t){if(!t?.style)return[];const{dashArray:e,style:o}=t;return"string"==typeof e&&"none"!==e?e.split(",").map(t=>Number(t)):w(m.get(o)??[],t)}function w(t,e){const o=e.width??0,r=t.map(t=>t*o);if("butt"!==e.cap)for(const[s,n]of r.entries())r[s]=s%2==1?n+o:Math.max(n-o,1);return r}const b=(()=>{const t={};return e=>{if(t[e])return t[e];const o=e.replaceAll("-","");return t[e]=o,o}})(),j=new e([128,128,128]);export{j as defaultThematicColor,b as dekebabifyLineStyle,g as getDashArray,u as getFill,f as getPatternUrlWithColor,y as getStroke,w as scaleDashArrayForStroke};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getAssetUrl as e}from"../../assets.js";import{toHSV as t,toRGB as l}from"../../core/colorUtils.js";import s from"../../core/Error.js";import a from"../../core/Logger.js";import{pt2px as n}from"../../core/screenUtils.js";import{defaultThematicColor as r,dekebabifyLineStyle as i,getPatternUrlWithColor as o}from"./gfxUtils.js";import{adjustColorComponentBrightness as c,shapes as u,getTetrahedronShapes as p,getDiamondShapes as h,getCylinderShapes as m,getCubeShapes as f,getInvertedConeShapes as y,getConeShapes as d,getPathSymbolShapes as b,getWaterSymbolShapes as v,getExtrudeSymbolShapes as g}from"./previewUtils.js";import{defaultObjectPrimitive as k,defaultIconPrimitive as w}from"./primitives.js";import{renderSymbol as x,tintImageWithColor as M}from"./renderUtils.js";import{isVolumetricSymbol as L,getIconHref as j}from"./utils.js";import{resolveWebStyleSymbol as z}from"./webStyleSymbolUtils.js";const S=22,P=120,U=80,C=50,D=20;function O(e){const t=e.outline,l=null!=e.material?e.material.color:null,s=null!=l?l.toHex():null;if(null==t||"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type&&"none"===t.pattern.style)return"fill"===e.type&&"#ffffff"===s?{color:"#bdc3c7",width:.75}:null;const a=n(t.size)||0;return{color:"rgba("+(null!=t.color?t.color.toRgba():"255,255,255,1")+")",width:Math.min(a,U),style:"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type?i(t.pattern.style):null,join:"butt",cap:"patternCap"in t?t.patternCap:"butt"}}async function E(t,l){if(t.thumbnail?.url)return t.thumbnail.url;if("icon"===l.type){const e=l?.resource?.href;if(e)return j(l)}const s=e("esri/images/Legend/legend3dsymboldefault.png");if(t.styleOrigin&&(t.styleOrigin.styleName||t.styleOrigin.styleUrl)){const e=await z(t.styleOrigin,{portal:t.styleOrigin.portal}).catch(()=>null);if(e&&"thumbnail"in e&&e.thumbnail?.url)return e.thumbnail.url}return s}function q(e,s=1){const a=e.a,n=t(e),r=n.h,i=n.s/s,o=100-(100-n.v)/s,{r:c,g:u,b:p}=l({h:r,s:i,v:o});return[c,u,p,a]}function R(e){return"water"===e.type?null==e.color?null:e.color:null==e.material?.color?null:e.material.color}function Z(e,t=0){const l=R(e);if(!l){if("fill"===e.type)return null;const l=r.r,s=c(l,t);return[s,s,s,100]}const s=l.toRgba();for(let a=0;a<3;a++)s[a]=c(s[a],t);return s}async function H(t,l){const s=t.style;if("none"===s)return null;return{type:"pattern",x:0,y:0,src:await o(e(`esri/symbols/patterns/${s}.png`),l.toCss(!0)),width:5,height:5}}function I(e){return e.outline?O(e):{color:"rgba(0, 0, 0, 1)",width:1.5}}function N(e,t){const l=R(e);if(!l)return null;let s="rgba(";return s+=c(l.r,t)+",",s+=c(l.g,t)+",",s+=c(l.b,t)+",",s+l.a+");"}function T(e,t){const l=e.edges;if(!l||!l.color||!l.size)return null;return{color:l.color.toCss(!0),width:Math.min(n(l.size),t,U),join:"round"}}function F(e,t){const l=N(e,t);if(!l)return null;if("pattern"in e&&null!=e.pattern&&"style"===e.pattern.type&&"none"===e.pattern.style)return null;const s={color:l,width:Math.min(e.size?n(e.size):.75,U)};return"pattern"in e&&"style"===e.pattern?.type&&(s.style=i(e.pattern.style)),"cap"in e&&e.cap&&(s.cap=e.cap),"join"in e&&e.join&&(s.join="miter"===e.join?n(2):e.join),s}function $(e,t,l){const s=null!=l?.75*l:0;return{type:"linear",x1:s?.25*s:0,y1:s?.5*s:0,x2:s||4,y2:s?.5*s:4,colors:[{color:e,offset:0},{color:t,offset:1}]}}function A(e){const t=e.depth,l=e.height,s=e.width;return 0!==s&&0!==t&&0!==l&&s===t&&null!=s&&null!=l&&s<l}function B(e,t,l){const s=[];if(!e)return s;switch(e.type){case"icon":{const l=0,a=0,n=t,r=t;switch(e.resource?.primitive??w){case"circle":s.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:Z(e,0),stroke:O(e)});break;case"square":s.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[l,a]},{command:"L",values:[n,a]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)});break;case"triangle":s.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[.5*n,a]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)});break;case"cross":s.push({shape:{type:"path",path:[{command:"M",values:[.5*n,a]},{command:"L",values:[.5*n,r]},{command:"M",values:[l,.5*r]},{command:"L",values:[n,.5*r]}]},stroke:I(e)});break;case"x":s.push({shape:{type:"path",path:[{command:"M",values:[l,a]},{command:"L",values:[n,r]},{command:"M",values:[n,a]},{command:"L",values:[l,r]}]},stroke:I(e)});break;case"kite":s.push({shape:{type:"path",path:[{command:"M",values:[l,.5*r]},{command:"L",values:[.5*n,a]},{command:"L",values:[n,.5*r]},{command:"L",values:[.5*n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)})}break}case"object":switch(e.resource?.primitive??k){case"cone":{const a=$(Z(e,0),Z(e,-.6),l?D:t),n=d(t,l);s.push({shape:n[0],fill:a},{shape:n[1],fill:a});break}case"inverted-cone":{const l=Z(e,0),a=$(l,Z(e,-.6),t),n=y(t);s.push({shape:n[0],fill:a},{shape:n[1],fill:l});break}case"cube":{const a=f(t,l);s.push({shape:a[0],fill:Z(e,0)},{shape:a[1],fill:Z(e,-.3)},{shape:a[2],fill:Z(e,-.5)});break}case"cylinder":{const a=$(Z(e,0),Z(e,-.6),l?D:t),n=m(t,l);s.push({shape:n[0],fill:a},{shape:n[1],fill:a},{shape:n[2],fill:Z(e,0)});break}case"diamond":{const l=h(t);s.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.3)},{shape:l[3],fill:Z(e,-.7)});break}case"sphere":{const l=$(Z(e,0),Z(e,-.6));l.x1=0,l.y1=0,l.x2=.25*t,l.y2=.25*t,s.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:l});break}case"tetrahedron":{const l=p(t);s.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.6)});break}}break}return s}function G(e){const t="number"==typeof e?.size?e?.size:null;return t?n(t):null}function J(e){return"icon"===e.type?"multiply":"tint"}function K(e){return(e.material?.emissive?.strength??0)>0}async function Q(e,t){const l=G(t),s=t?.maxSize?n(t.maxSize):null,r=t?.disableUpsampling??!1,i=e.symbolLayers,o=[],c=[];let u=!1,p=0,h=0,m=null,f=0;i.forEach(a=>{if("icon"!==a.type&&"object"!==a.type)return;a&&"icon"===a.type&&(f=Math.max(a.size&&n(a.size),f));const i="icon"===a.type?a.size&&n(a.size):0,y=l||i?Math.ceil(Math.min(l||i,s||P)):S;let d="icon"===a.type?a.angle:null;if(null!=t?.rotation&&(d=(d??0)+t.rotation),c.push(d),"object"===a.type&&K(a)&&(m=a.material.emissive),a?.resource?.href){const t=E(e,a).then(e=>{const t=a?.material?.color,l=J(a);return M(e,y,t,l,r,m)}).then(e=>{const t=e.width,l=e.height;return p=Math.max(p,t),h=Math.max(h,l),d&&(u=!0),[{shape:{type:"image",x:0,y:0,width:t,height:l,src:e.url},fill:null,stroke:null}]});o.push(t)}else{let e=y;"icon"===a.type&&l&&(e=y*(i/f));const s="tall"===t?.symbolConfig||t?.symbolConfig?.isTall||"object"===a.type&&A(a);p=Math.max(p,s?D:e),h=Math.max(h,e),d&&a.resource?.primitive&&["square","triangle","x"].includes(a.resource?.primitive)&&(u=!0),o.push(Promise.resolve(B(a,e,s)))}});const y=await Promise.allSettled(o),d=[];return y.forEach(e=>{"fulfilled"===e.status?d.push(e.value):e.reason&&a.getLogger("esri.symbols.support.previewSymbol3D").warn("error while building swatchInfo!",e.reason)}),x(d,[p,h],{node:t?.node,scale:!1,opacity:t?.opacity,ariaLabel:t?.ariaLabel,rotations:c,useRotationSize:u,emissive:m})}function V(e,t){const l=e.symbolLayers,s=[],a=L(e),r=G(t),i=(t?.maxSize?n(t.maxSize):null)||U;let o,c=null,p=0,h=0;return l.forEach((e,t)=>{if(!e)return;if("line"!==e.type&&"path"!==e.type)return;const l=[];switch(e.type){case"line":{const s=F(e,0);if(null==s)break;const a=s?.width||0;0===t&&(o=a);const n=Math.min(r||a,i),c=0===t?n:r?n*(a/o):n,u=c>C/2?2*c:C;h=Math.max(h,c),p=Math.max(p,u),s.width=c,l.push({shape:{type:"path",path:[{command:"M",values:[0,.5*h]},{command:"L",values:[p,.5*h]}]},stroke:s});break}case"path":{const t=Math.min(r||S,i),s=Z(e,0),a=Z(e,-.2),n=N(e,-.4),o=n?{color:n,width:1}:{};if("quad"===e.profile){const t=e.width,n=e.height,r=b(t&&n?t/n:1,0===n,0===t),i={...o,join:"bevel"};l.push({shape:r[0],fill:a,stroke:i},{shape:r[1],fill:a,stroke:i},{shape:r[2],fill:s,stroke:i})}else l.push({shape:u.pathSymbol3DLayer[0],fill:a,stroke:o},{shape:u.pathSymbol3DLayer[1],fill:s,stroke:o});h=Math.max(h,t),p=h,K(e)&&(c=e.material.emissive)}}s.push(l)}),Promise.resolve(x(s,[p,h],{node:t?.node,scale:a,opacity:t?.opacity,ariaLabel:t?.ariaLabel,emissive:c}))}async function W(e,t){const l="mesh-3d"===e.type,s=e.symbolLayers,a=G(t),r=t?.maxSize?n(t.maxSize):null,i=a||S,o=[];let c=0,p=0,h=!1,m=null;for(let n=0;n<s.length;n++){const e=s.at(n),t=[];if(!l||"fill"===e.type){switch(e.type){case"fill":{const s=Math.min(i,r||P);if(c=Math.max(c,s),p=Math.max(p,s),h=!0,l){const l=u.meshSymbol3DFill,a=N(e,-.4),n=T(e,.05*s)??(a?{join:"round",color:a,width:1}:null);t.push({shape:l[0],fill:Z(e,0),stroke:n},{shape:l[1],fill:Z(e,-.2),stroke:n},{shape:l[2],fill:Z(e,-.6),stroke:n}),K(e)&&(m=e.material.emissive)}else{let l=Z(e,0);const s="pattern"in e?e.pattern:null,a=O(e),n=R(e);null!=s&&"style"===s.type&&"solid"!==s.style&&n&&(l=await H(s,n)),t.push({shape:u.fill[0],fill:l,stroke:a})}break}case"extrude":{const l=Z(e,0),s=Z(e,-.2),a=Math.min(i,r||P),n=g(a),o=S,u=.7*S+.5*a,h=T(e,.1*Math.min(o,u))??{join:"round",...F(e,-.4),width:1};t.push({shape:n[0],fill:s,stroke:h},{shape:n[1],fill:s,stroke:h},{shape:n[2],fill:l,stroke:h}),c=Math.max(c,o),p=Math.max(p,u),K(e)&&(m=e.material.emissive);break}case"water":{const l=R(e),s=q(l),a=q(l,2),n=q(l,3),o=v();h=!0,t.push({shape:o[0],fill:s},{shape:o[1],fill:a},{shape:o[2],fill:n});const u=Math.min(i,r||P);c=Math.max(c,u),p=Math.max(p,u);break}}o.push(t)}}return x(o,[c,p],{node:t?.node,scale:h,opacity:t?.opacity,ariaLabel:t?.ariaLabel,emissive:m})}function X(e,t){if(0===e.symbolLayers.length)return Promise.reject(new s("symbolPreview: renderPreviewHTML3D","No symbolLayers in the symbol."));switch(e.type){case"point-3d":return Q(e,t);case"line-3d":return V(e,t);case"polygon-3d":case"mesh-3d":return W(e,t)}return Promise.reject(new s("symbolPreview: swatchInfo3D","symbol not supported."))}export{H as getPatternDescriptor,G as getSizeFromOptions,Z as getSymbolLayerFill,X as previewSymbol3D};
|
|
2
|
+
import{getAssetUrl as e}from"../../assets.js";import{toHSV as t,toRGB as l}from"../../core/colorUtils.js";import s from"../../core/Error.js";import a from"../../core/Logger.js";import{pt2px as n}from"../../core/screenUtils.js";import{defaultThematicColor as r,scaleDashArrayForStroke as i,dekebabifyLineStyle as o,getPatternUrlWithColor as c}from"./gfxUtils.js";import{adjustColorComponentBrightness as p,shapes as u,getPathSymbolShapes as h,getTetrahedronShapes as m,getDiamondShapes as f,getCylinderShapes as y,getCubeShapes as d,getInvertedConeShapes as b,getConeShapes as v,getWaterSymbolShapes as g,getExtrudeSymbolShapes as w}from"./previewUtils.js";import{defaultObjectPrimitive as k,defaultIconPrimitive as x}from"./primitives.js";import{renderSymbol as M,tintImageWithColor as L}from"./renderUtils.js";import{isVolumetricSymbol as j,getIconHref as z}from"./utils.js";import{resolveWebStyleSymbol as S}from"./webStyleSymbolUtils.js";const D=22,P=120,U=80,C=50,E=20;function O(e){const t=e.outline,l=null!=e.material?e.material.color:null,s=null!=l?l.toHex():null;if(null==t||"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type&&"none"===t.pattern.style)return"fill"===e.type&&"#ffffff"===s?{color:"#bdc3c7",width:.75}:null;const a=n(t.size)||0;return{color:"rgba("+(null!=t.color?t.color.toRgba():"255,255,255,1")+")",width:Math.min(a,U),style:"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type?o(t.pattern.style):null,join:"butt",cap:"patternCap"in t?t.patternCap:"butt"}}async function T(t,l){if(t.thumbnail?.url)return t.thumbnail.url;if("icon"===l.type){const e=l?.resource?.href;if(e)return z(l)}const s=e("esri/images/Legend/legend3dsymboldefault.png");if(t.styleOrigin&&(t.styleOrigin.styleName||t.styleOrigin.styleUrl)){const e=await S(t.styleOrigin,{portal:t.styleOrigin.portal}).catch(()=>null);if(e&&"thumbnail"in e&&e.thumbnail?.url)return e.thumbnail.url}return s}function R(e,s=1){const a=e.a,n=t(e),r=n.h,i=n.s/s,o=100-(100-n.v)/s,{r:c,g:p,b:u}=l({h:r,s:i,v:o});return[c,p,u,a]}function q(e){return"water"===e.type?null==e.color?null:e.color:null==e.material?.color?null:e.material.color}function Z(e,t=0){const l=q(e);if(!l){if("fill"===e.type)return null;const l=r.r,s=p(l,t);return[s,s,s,100]}const s=l.toRgba();for(let a=0;a<3;a++)s[a]=p(s[a],t);return s}async function A(t,l){const s=t.style;if("none"===s)return null;return{type:"pattern",x:0,y:0,src:await c(e(`esri/symbols/patterns/${s}.png`),l.toCss(!0)),width:5,height:5}}function H(e){return e.outline?O(e):{color:"rgba(0, 0, 0, 1)",width:1.5}}function I(e,t){const l=q(e);if(!l)return null;let s="rgba(";return s+=p(l.r,t)+",",s+=p(l.g,t)+",",s+=p(l.b,t)+",",s+l.a+");"}function N(e,t){const l=e.edges;if(!l||!l.color||!l.size)return null;return{color:l.color.toCss(!0),width:Math.min(n(l.size),t,U),join:"round"}}function F(e,t){const l=I(e,t),s="line"===e.type;if(!l)return null;if(s&&null!=e.pattern){const{pattern:t}=e;if("style"===t.type&&"none"===t.style||"template"===t.type&&t.normalizedDashTemplate.hidesLine)return null}const a={color:l,width:Math.min(e.size?n(e.size):.75,U)};return"cap"in e&&e.cap&&(a.cap=e.cap),"join"in e&&e.join&&(a.join="miter"===e.join?n(2):e.join),s&&"style"===e.pattern?.type&&(a.style=o(e.pattern.style)),a}function W(e,t,l){const s=null!=l?.75*l:0;return{type:"linear",x1:s?.25*s:0,y1:s?.5*s:0,x2:s||4,y2:s?.5*s:4,colors:[{color:e,offset:0},{color:t,offset:1}]}}function $(e){const t=e.depth,l=e.height,s=e.width;return 0!==s&&0!==t&&0!==l&&s===t&&null!=s&&null!=l&&s<l}function B(e,t,l){const s=[];if(!e)return s;switch(e.type){case"icon":{const l=0,a=0,n=t,r=t;switch(e.resource?.primitive??x){case"circle":s.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:Z(e,0),stroke:O(e)});break;case"square":s.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[l,a]},{command:"L",values:[n,a]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)});break;case"triangle":s.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[.5*n,a]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)});break;case"cross":s.push({shape:{type:"path",path:[{command:"M",values:[.5*n,a]},{command:"L",values:[.5*n,r]},{command:"M",values:[l,.5*r]},{command:"L",values:[n,.5*r]}]},stroke:H(e)});break;case"x":s.push({shape:{type:"path",path:[{command:"M",values:[l,a]},{command:"L",values:[n,r]},{command:"M",values:[n,a]},{command:"L",values:[l,r]}]},stroke:H(e)});break;case"kite":s.push({shape:{type:"path",path:[{command:"M",values:[l,.5*r]},{command:"L",values:[.5*n,a]},{command:"L",values:[n,.5*r]},{command:"L",values:[.5*n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)})}break}case"object":switch(e.resource?.primitive??k){case"cone":{const a=W(Z(e,0),Z(e,-.6),l?E:t),n=v(t,l);s.push({shape:n[0],fill:a},{shape:n[1],fill:a});break}case"inverted-cone":{const l=Z(e,0),a=W(l,Z(e,-.6),t),n=b(t);s.push({shape:n[0],fill:a},{shape:n[1],fill:l});break}case"cube":{const a=d(t,l);s.push({shape:a[0],fill:Z(e,0)},{shape:a[1],fill:Z(e,-.3)},{shape:a[2],fill:Z(e,-.5)});break}case"cylinder":{const a=W(Z(e,0),Z(e,-.6),l?E:t),n=y(t,l);s.push({shape:n[0],fill:a},{shape:n[1],fill:a},{shape:n[2],fill:Z(e,0)});break}case"diamond":{const l=f(t);s.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.3)},{shape:l[3],fill:Z(e,-.7)});break}case"sphere":{const l=W(Z(e,0),Z(e,-.6));l.x1=0,l.y1=0,l.x2=.25*t,l.y2=.25*t,s.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:l});break}case"tetrahedron":{const l=m(t);s.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.6)});break}}break}return s}function G(e){const t="number"==typeof e?.size?e?.size:null;return t?n(t):null}function J(e){return"icon"===e.type?"multiply":"tint"}function K(e){return(e.material?.emissive?.strength??0)>0}async function Q(e,t){const l=G(t),s=t?.maxSize?n(t.maxSize):null,r=t?.disableUpsampling??!1,i=e.symbolLayers,o=[],c=[];let p=!1,u=0,h=0,m=null,f=0;i.forEach(a=>{if("icon"!==a.type&&"object"!==a.type)return;a&&"icon"===a.type&&(f=Math.max(a.size&&n(a.size),f));const i="icon"===a.type?a.size&&n(a.size):0,y=l||i?Math.ceil(Math.min(l||i,s||P)):D;let d="icon"===a.type?a.angle:null;if(null!=t?.rotation&&(d=(d??0)+t.rotation),c.push(d),"object"===a.type&&K(a)&&(m=a.material.emissive),a?.resource?.href){const t=T(e,a).then(e=>{const t=a?.material?.color,l=J(a);return L(e,y,t,l,r,m)}).then(e=>{const t=e.width,l=e.height;return u=Math.max(u,t),h=Math.max(h,l),d&&(p=!0),[{shape:{type:"image",x:0,y:0,width:t,height:l,src:e.url},fill:null,stroke:null}]});o.push(t)}else{let e=y;"icon"===a.type&&l&&(e=y*(i/f));const s="tall"===t?.symbolConfig||t?.symbolConfig?.isTall||"object"===a.type&&$(a);u=Math.max(u,s?E:e),h=Math.max(h,e),d&&a.resource?.primitive&&["square","triangle","x"].includes(a.resource?.primitive)&&(p=!0),o.push(Promise.resolve(B(a,e,s)))}});const y=await Promise.allSettled(o),d=[];return y.forEach(e=>{"fulfilled"===e.status?d.push(e.value):e.reason&&a.getLogger("esri.symbols.support.previewSymbol3D").warn("error while building swatchInfo!",e.reason)}),M(d,[u,h],{node:t?.node,scale:!1,opacity:t?.opacity,ariaLabel:t?.ariaLabel,rotations:c,useRotationSize:p,emissive:m})}function V(e,t){const l=j(e),s=[],a=G(t),r=(t?.maxSize?n(t.maxSize):null)||U,o=l?Math.min(a||D,r):0;let c,p=0,u=0;e.symbolLayers.forEach(e=>{if("line"!==e?.type)return;const t=F(e,0);if(null==t)return;const l=t.width||0,n=Math.min(a||l,r);null==c?(c=l,t.width=n):t.width=a?n*(l/c):n,u=Math.max(u,t.width),p=Math.max(p,2*t.width,C),"template"===e.pattern?.type&&(t.dashArray=i(e.pattern.normalizedDashTemplate.dashTemplate,t).join(",")),s.push(t)});const h=[];if(s.length>0){const e=X(p,u);h.push(s.map(t=>({shape:e,stroke:t})))}let m=null;return e.symbolLayers.forEach(e=>{"path"===e?.type&&(h.push(Y(e)),K(e)&&(m=e.material.emissive))}),Promise.resolve(M(h,[Math.max(p,o),Math.max(u,o)],{node:t?.node,scale:l,preserveAspectRatio:l&&s.length>0,fittingStrokeWidths:s.length>0?[u]:void 0,opacity:t?.opacity,ariaLabel:t?.ariaLabel,emissive:m}))}function X(e,t){return{type:"path",path:[{command:"M",values:[0,.5*t]},{command:"L",values:[e,.5*t]}]}}function Y(e){const t=Z(e,0),l=Z(e,-.2),s=I(e,-.4),a=s?{color:s,width:1}:{};if("quad"===e.profile){const s=e.width,n=e.height,r=h(s&&n?s/n:1,0===n,0===s),i={...a,join:"bevel"};return[{shape:r[0],fill:l,stroke:i},{shape:r[1],fill:l,stroke:i},{shape:r[2],fill:t,stroke:i}]}return[{shape:u.pathSymbol3DLayer[0],fill:l,stroke:a},{shape:u.pathSymbol3DLayer[1],fill:t,stroke:a}]}async function _(e,t){const l="mesh-3d"===e.type,s=e.symbolLayers,a=G(t),r=t?.maxSize?n(t.maxSize):null,i=a||D,o=[];let c=0,p=0,h=!1,m=null;for(let n=0;n<s.length;n++){const e=s.at(n),t=[];if(!l||"fill"===e.type){switch(e.type){case"fill":{const s=Math.min(i,r||P);if(c=Math.max(c,s),p=Math.max(p,s),h=!0,l){const l=u.meshSymbol3DFill,a=I(e,-.4),n=N(e,.05*s)??(a?{join:"round",color:a,width:1}:null);t.push({shape:l[0],fill:Z(e,0),stroke:n},{shape:l[1],fill:Z(e,-.2),stroke:n},{shape:l[2],fill:Z(e,-.6),stroke:n}),K(e)&&(m=e.material.emissive)}else{let l=Z(e,0);const s="pattern"in e?e.pattern:null,a=O(e),n=q(e);null!=s&&"style"===s.type&&"solid"!==s.style&&n&&(l=await A(s,n)),t.push({shape:u.fill[0],fill:l,stroke:a})}break}case"extrude":{const l=Z(e,0),s=Z(e,-.2),a=Math.min(i,r||P),n=w(a),o=D,u=.7*D+.5*a,h=N(e,.1*Math.min(o,u))??{join:"round",...F(e,-.4),width:1};t.push({shape:n[0],fill:s,stroke:h},{shape:n[1],fill:s,stroke:h},{shape:n[2],fill:l,stroke:h}),c=Math.max(c,o),p=Math.max(p,u),K(e)&&(m=e.material.emissive);break}case"water":{const l=q(e),s=R(l),a=R(l,2),n=R(l,3),o=g();h=!0,t.push({shape:o[0],fill:s},{shape:o[1],fill:a},{shape:o[2],fill:n});const u=Math.min(i,r||P);c=Math.max(c,u),p=Math.max(p,u);break}}o.push(t)}}return M(o,[c,p],{node:t?.node,scale:h,opacity:t?.opacity,ariaLabel:t?.ariaLabel,emissive:m})}function ee(e,t){if(0===e.symbolLayers.length)return Promise.reject(new s("symbolPreview: renderPreviewHTML3D","No symbolLayers in the symbol."));switch(e.type){case"point-3d":return Q(e,t);case"line-3d":return V(e,t);case"polygon-3d":case"mesh-3d":return _(e,t)}return Promise.reject(new s("symbolPreview: swatchInfo3D","symbol not supported."))}export{A as getPatternDescriptor,G as getSizeFromOptions,Z as getSymbolLayerFill,ee as previewSymbol3D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getColorWithEmissiveStrength as t}from"../../core/colorUtils.js";import has from"../../core/has.js";import{assertIsSome as e}from"../../core/maybe.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/mat2df32.js";import{multiply as r,scale as o,identity as n,translate as
|
|
2
|
+
import{getColorWithEmissiveStrength as t}from"../../core/colorUtils.js";import has from"../../core/has.js";import{assertIsSome as e}from"../../core/maybe.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/mat2df32.js";import{multiply as r,scale as o,identity as n,translate as s,rotate as a}from"../../core/libs/gl-matrix-2/math/mat2d.js";import{getDashArray as l}from"./gfxUtils.js";import{nextPatternId as h,nextLinearGradientId as c}from"./svgGlobalState.js";import{matchesBloomFilter as f,BloomFilter as d}from"./svgFilter/bloomFilter.js";import{matchesEmissiveFilter as y,EmissiveFilter as u}from"./svgFilter/emissiveFilter.js";import{tsx as g}from"../../widgets/support/widget.js";const p="http://www.w3.org/2000/svg",m=has("android"),x=has("chrome")||m&&m>=4?"auto":"optimizeLegibility",k={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},w=/([A-DF-Za-df-z])|([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let b={},j={};const v=Math.PI;function A(t,e){const i=t*(v/180);return Math.abs(e*Math.sin(i))+Math.abs(e*Math.cos(i))}function S(t){return t.map(t=>`${t.command} ${t.values.join(" ")}`).join(" ").trim()}function M(t,i,r,o,n){if(t){if("circle"===t.type)return g("circle",{cx:t.cx,cy:t.cy,fill:i,"fill-rule":"evenodd",r:t.r,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-dashoffset":r.dashOffset,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width});if("ellipse"===t.type)return g("ellipse",{cx:t.cx,cy:t.cy,fill:i,"fill-rule":"evenodd",rx:t.rx,ry:t.ry,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width});if("rect"===t.type)return g("rect",{fill:i,"fill-rule":"evenodd",height:t.height,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width,width:t.width,x:t.x,y:t.y});if("image"===t.type)return g("image",{alt:n||"image",height:t.height,href:t.src,preserveAspectRatio:"none",width:t.width,x:t.x,y:t.y});if("path"===t.type){const e="string"!=typeof t.path?S(t.path):t.path;return g("path",{d:e,fill:i,"fill-rule":"evenodd",stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width})}if("text"===t.type)return e(o),g("text",{"dominant-baseline":o.dominantBaseline,fill:i,"fill-rule":"evenodd","font-family":o.font.family,"font-size":o.font.size,"font-style":o.font.style,"font-variant":o.font.variant,"font-weight":o.font.weight,kerning:o.kerning,rotate:o.rotate,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width,"text-anchor":o.align,"text-decoration":o.decoration,"text-rendering":x,x:t.x,y:t.y},t.text)}return null}function $(e,i){if(!e)return{fill:"none",pattern:null,linearGradient:null};if(!("type"in e))return{fill:t(e,i).toString(),pattern:null,linearGradient:null};if("pattern"===e.type){const t=`patternId-${h()}`;return{fill:`url(#${t})`,pattern:{id:t,x:e.x,y:e.y,width:e.width,height:e.height,image:{x:0,y:0,width:e.width,height:e.height,href:e.src}},linearGradient:null}}const r=`linearGradientId-${c()}`;return{fill:`url(#${r})`,pattern:null,linearGradient:{id:r,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stops:e.colors.map(e=>({offset:e.offset,color:t(e.color,i).toString()}))}}}function z(e,i){const r={color:"none",width:1,cap:"butt",join:"4",dashArray:"none",dashOffset:"0"};return e&&(null!=e.width&&(r.width=e.width),e.cap&&(r.cap=e.cap),e.join&&(r.join=e.join.toString()),e.color&&(r.color=t(e.color,i).toString()),e.dashArray&&(r.dashArray=e.dashArray),e.dashoffset&&(r.dashOffset=e.dashoffset),e.style&&!e.dashArray&&(r.dashArray=l(e).join(",")||"none")),r}function I(t,i){const r={align:null,decoration:null,kerning:null,rotate:null,font:{style:null,variant:null,weight:null,size:null,family:null}};if(t){const o=t.alignBaseline,n="baseline"===o?"auto":"top"===o?"text-top":"bottom"===o?"hanging":o;r.align=t.align,r.dominantBaseline=n,r.decoration=t.decoration,r.kerning=t.kerning?"auto":"0",r.rotate=t.rotated?"90":"0",e(i),r.font.style=i.style||"normal",r.font.variant=i.variant||"normal",r.font.weight=i.weight||"normal",r.font.size=i.size&&i.size.toString()||"10pt",r.font.family=i.family||"serif"}return r}function F(t){const{pattern:e,linearGradient:i}=t;if(e)return g("pattern",{height:e.height,id:e.id,patternUnits:"userSpaceOnUse",width:e.width,x:e.x,y:e.y},g("image",{height:e.image.height,href:e.image.href,width:e.image.width,x:e.image.x,y:e.image.y}));if(i){const t=i.stops.map((t,e)=>g("stop",{key:`${e}-stop`,offset:t.offset,"stop-color":t.color}));return g("linearGradient",{gradientUnits:"userSpaceOnUse",id:i.id,x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2},t)}return null}function N(t,e){if(!t||0===t.length)return null;const i=[];for(const r of t){const{shape:t,fill:e,stroke:o,font:n}=r,s=$(e),a=z(o),l="text"===t.type?I(t,n):null,h=M(t,s.fill,a,l);h&&i.push(h)}return g("mask",{id:e,maskUnits:"userSpaceOnUse"},g("g",null,i))}function G(t,e,i){return s(t,n(t),[e,i])}function E(t,e,i,r,s){return o(t,n(t),[e,i]),t[4]=t[4]*e-r*e+r,t[5]=t[5]*i-s*i+s,t}function U(t,e,i,r){const o=e%360*Math.PI/180;a(t,n(t),o);const s=Math.cos(o),l=Math.sin(o),h=t[4],c=t[5];return t[4]=h*s-c*l+r*l-i*s+i,t[5]=c*s+h*l-i*l-r*s+r,t}function O(t,e){b&&"left"in b?(null!=b.left&&b.left>t&&(b.left=t),(null==b.right||b.right<t)&&(b.right=t),(null==b.top||b.top>e)&&(b.top=e),(null==b.bottom||b.bottom<e)&&(b.bottom=e)):b={left:t,bottom:e,right:t,top:e}}function L(t){const e=t.args,i=e.length;let r;switch(t.action){case"M":case"L":case"C":case"S":case"Q":case"T":for(r=0;r<i;r+=2)O(e[r],e[r+1]);j.x=e[i-2],j.y=e[i-1];break;case"H":for(r=0;r<i;++r)O(e[r],j.y);j.x=e[i-1];break;case"V":for(r=0;r<i;++r)O(j.x,e[r]);j.y=e[i-1];break;case"m":{let t=0;"x"in j||(O(j.x=e[0],j.y=e[1]),t=2);for(r=t;r<i;r+=2)O(j.x+=e[r],j.y+=e[r+1]);break}case"l":case"t":for(r=0;r<i;r+=2)O(j.x+=e[r],j.y+=e[r+1]);break;case"h":for(r=0;r<i;++r)O(j.x+=e[r],j.y);break;case"v":for(r=0;r<i;++r)O(j.x,j.y+=e[r]);break;case"c":for(r=0;r<i;r+=6)O(j.x+e[r],j.y+e[r+1]),O(j.x+e[r+2],j.y+e[r+3]),O(j.x+=e[r+4],j.y+=e[r+5]);break;case"s":case"q":for(r=0;r<i;r+=4)O(j.x+e[r],j.y+e[r+1]),O(j.x+=e[r+2],j.y+=e[r+3]);break;case"A":for(r=0;r<i;r+=7)O(e[r+5],e[r+6]);j.x=e[i-2],j.y=e[i-1];break;case"a":for(r=0;r<i;r+=7)O(j.x+=e[r+5],j.y+=e[r+6])}}function R(t,e,i){const r=k[t.toLowerCase()];let o;"number"==typeof r&&(r?e.length>=r&&(o={action:t,args:e.slice(0,e.length-e.length%r)},i.push(o),L(o)):(o={action:t,args:[]},i.push(o),L(o)))}function T(t){const e=("string"!=typeof t.path?S(t.path):t.path).match(w),i=[];if(b={},j={},!e)return null;let r="",o=[];const n=e.length;for(let a=0;a<n;++a){const t=e[a],n=parseFloat(t);isNaN(n)?(r&&R(r,o,i),o=[],r=t):o.push(n)}R(r,o,i);const s={x:0,y:0,width:0,height:0};return b&&"left"in b&&(s.x=b.left,s.y=b.top,s.width=b.right-b.left,s.height=b.bottom-b.top),s}function B(t){const e={x:0,y:0,width:0,height:0};if("circle"===t.type)e.x=t.cx-t.r,e.y=t.cy-t.r,e.width=2*t.r,e.height=2*t.r;else if("ellipse"===t.type)e.x=t.cx-t.rx,e.y=t.cy-t.ry,e.width=2*t.rx,e.height=2*t.ry;else if("image"===t.type||"rect"===t.type)e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height;else if("path"===t.type){const i=T(t);e.x=i.x,e.y=i.y,e.width=i.width,e.height=i.height}return e}function V(t){const e={x:0,y:0,width:0,height:0};let i=null,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(const n of t)i?(i.x=Math.min(i.x,n.x),i.y=Math.min(i.y,n.y),r=Math.max(r,n.x+n.width),o=Math.max(o,n.y+n.height)):(i=e,i.x=n.x,i.y=n.y,r=n.x+n.width,o=n.y+n.height);return i&&(i.width=r-i.x,i.height=o-i.y),i}function W(t,e,o,n,s,a,l,h,c,f=!1){let d=(l&&a?A(a,e):e)/2,y=(l&&a?A(a,o):o)/2;if(c){const t=c[0],e=c[1];d=(l&&a?A(a,t):t)/2,y=(l&&a?A(a,e):e)/2}const u=t.width+n,g=t.height+n,p=i(),m=i();let x=!1;if(s&&0!==u&&0!==g){const t=e!==o?e/o:u/g,i=e>o?e:o;let n=1,s=1;f?n=s=Math.min(e/u,o/g):isNaN(i)||(t>1?(n=i/u,s=i/t/g):(s=i/g,n=i*t/u)),r(m,m,E(p,n,s,d,y)),x=!0}const k=t.x+(u-n)/2,w=t.y+(g-n)/2;if(r(m,m,G(p,d-k,y-w)),!x&&(u>e||g>o)){const t=u/e>g/o,i=(t?e:o)/(t?u:g);r(m,m,E(p,i,i,k,w))}return h&&r(m,m,G(p,h[0],h[1])),a&&r(m,m,U(p,a,k,w)),`matrix(${m[0]},${m[1]},${m[2]},${m[3]},${m[4]},${m[5]})`}function q(t,i,r,o={}){const n=[],s=[],a=f(o.cssEffectFilter)?new d(o.cssEffectFilter,i):y(o.emissive?.strength)?new u(t,o.emissive?.strength):null,l=a?.getSize(i,r,o.clipBloomEffect);let h=i,c=r;if(o.useRotationSize)for(let e=0;e<t.length;e++){const t=o.rotations?.[e]??0;h=Math.max(A(t,i),h),c=Math.max(A(t,r),c)}for(let e=0;e<t.length;e++){const a=t[e],f=[],d=[];let y=0,u=0,p=0;for(const t of a){const{shape:e,fill:i,stroke:r,font:s,offset:a}=t;o.ignoreStrokeWidth||"text"===e.type||(y+=r?.width||0);const l=$(i,o.emissive),h=z(r,o.emissive),c="text"===e.type?I(e,s):null;n.push(F(l)),f.push(M(e,l.fill,h,c,o.ariaLabel)),d.push(B(e)),a&&(u+=a[0],p+=a[1])}const m=o.rotations?.[e]??0;o.useRotationSize&&(u+=(h-A(m,i))/2,p+=(c-A(m,r))/2);const x=W(V(d),i,r,o.ignoreStrokeWidth?0:o.fittingStrokeWidths?.[e]??y,o.scale??!1,m,o.useRotationSize??!1,[u,p],l,o.preserveAspectRatio);let k=null;if(o.masking){const t=`mask-${e}`,i=o.masking[e];n.push(N(i,t)),k=`url(#${t})`}s.push(k?g("g",{mask:k},g("g",{transform:x},f)):g("g",{transform:x},f))}a&&(e(l),h=l[0],c=l[1]);const m="display: block;";return g("svg",{"aria-label":o.ariaLabel,focusable:!1,height:c,role:"img",style:m,width:h,xmlns:p},a?.getFilter(),g("defs",null,n),a?g("g",{filter:`url(#${a.getFilterId()})`},s):s)}export{V as computeBBox,$ as generateFillAttributes,z as generateStrokeAttributes,I as generateTextAttributes,B as getBoundingBox,W as getTransformMatrix,F as renderDef,q as renderSVG,M as renderShape};
|
package/time/timeZoneUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{UnknownTimeZone as t}from"../core/sql/UnknownTimeZone.js";import{system as e,unknown as n,utc as o}from"./constants.js";import{createLuxonIanaTimeZone as r}from"./ianaZone.js";import{legacyTimeZoneMap as i}from"./legacyTimeZoneMap.js";import{FixedOffsetZone as s,DateTime as m}from"luxon";const u="shortOffset";function a(t){return"timeZoneIANA"in t}function c(t){return t.startsWith("UTC")}function f(t,e=!1,n=!0){return{json:{read:{source:t,reader:(e,n)=>n[t]?l(n[t]):null},write:!!e&&{allowNull:n,writer(e,n){n[t]=e?Z(e):null}}}}}function l(t,n=e){return t?a(t)?t.timeZoneIANA:p(t,n):n}function Z(t){return{timeZoneIANA:t}}function p(t,n=e){if(!t||!i.has(t.timeZone))return n;const o=i.get(t.timeZone);return c(t.timeZone)||t.respectsDaylightSaving?o:h(o)}function h(t){const e=m.local().setZone(t),n=Math.min(e.set({month:1,day:1}).offset,e.set({month:5}).offset);if(0===n)return"Etc/UTC";return`Etc/GMT${s.instance(-n).formatOffset(0,"narrow")}`}function w(t,e,r,i,s){if(e&&"date"===s)return{timeZone:o,timeZoneName:void 0};const m=i.hour,a=r===n;return{timeZone:a?"timestamp-offset"===s?void 0:t??o:r,timeZoneName:a&&m?u:void 0}}function d(t){const o=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map(t=>t.toLowerCase()));return t===e||t===n||o.has(t.toLowerCase())||r.has(t.toLowerCase())}function g(e){return e===n?t.instance:e===o||"Etc/UTC"===e?s.utcInstance:r(e)}export{p as convertLegacyTimeZone,l as fromTimeReference,g as getLuxonTimeZone,w as getTimeZoneFormattingOptions,d as isTimeZoneValid,u as shortTimeZoneName,f as timeZoneProperty,Z as toTimeReference};
|
|
2
|
+
import{UnknownTimeZone as t}from"../core/sql/UnknownTimeZone.js";import{system as e,unknown as n,utc as o}from"./constants.js";import{createLuxonIanaTimeZone as r}from"./ianaZone.js";import{legacyTimeZoneMap as i}from"./legacyTimeZoneMap.js";import{FixedOffsetZone as s,DateTime as m}from"luxon";const u="shortOffset";function a(t){return"timeZoneIANA"in t}function c(t){return t.startsWith("UTC")}function f(t,e=!1,n=!0){return{json:{read:{source:t,reader:(e,n)=>n[t]?l(n[t]):null},write:!!e&&{allowNull:n,writer(e,n){n[t]=e?Z(e):null},target:{[`${t}.timeZoneIANA`]:{type:String}}}}}}function l(t,n=e){return t?a(t)?t.timeZoneIANA:p(t,n):n}function Z(t){return{timeZoneIANA:t}}function p(t,n=e){if(!t||!i.has(t.timeZone))return n;const o=i.get(t.timeZone);return c(t.timeZone)||t.respectsDaylightSaving?o:h(o)}function h(t){const e=m.local().setZone(t),n=Math.min(e.set({month:1,day:1}).offset,e.set({month:5}).offset);if(0===n)return"Etc/UTC";return`Etc/GMT${s.instance(-n).formatOffset(0,"narrow")}`}function w(t,e,r,i,s){if(e&&"date"===s)return{timeZone:o,timeZoneName:void 0};const m=i.hour,a=r===n;return{timeZone:a?"timestamp-offset"===s?void 0:t??o:r,timeZoneName:a&&m?u:void 0}}function d(t){const o=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map(t=>t.toLowerCase()));return t===e||t===n||o.has(t.toLowerCase())||r.has(t.toLowerCase())}function g(e){return e===n?t.instance:e===o||"Etc/UTC"===e?s.utcInstance:r(e)}export{p as convertLegacyTimeZone,l as fromTimeReference,g as getLuxonTimeZone,w as getTimeZoneFormattingOptions,d as isTimeZoneValid,u as shortTimeZoneName,f as timeZoneProperty,Z as toTimeReference};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{createScreenPointArray as t}from"../../../../../core/screenUtils.js";import{copy as e,subtract as i,
|
|
2
|
+
import{createScreenPointArray as t}from"../../../../../core/screenUtils.js";import{copy as e,subtract as i,add as o}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as r}from"../../../../../geometry/ellipsoidUtils.js";import{fromRenderCamera as n}from"../../../webgl.js";import{shortenTranslation as a}from"../../../state/utils/groundNavigationUtils.js";import{pickPointAndInitSphere as m}from"../../../state/utils/navigationUtils.js";import{OffsetCorrectionController as l}from"../../../state/utils/OffsetCorrectionController.js";import c from"../../../webgl/RenderCamera.js";import{InputHandler as p}from"../../../../input/InputHandler.js";import{eventMatchesPointerAction as h}from"../../../../input/handlers/support.js";const f=.99,_=2,g=1e3,u=500;class d extends p{constructor(t,e){super(!0),this._view=t,this._tmpTranslation=s(),this._tmpTargetLocation=s(),this._tmpCenterOffset=s(),this.registerIncoming("double-click",e,t=>this._handleDoubleClick(t)),this._offsetCorrectionController=new l(this._view)}_handleDoubleClick(t){if("ground"!==this._view.navigation.mode.type)return;const{data:e}=t;h(e,"primary")&&(this._move(t),t.stopPropagation())}async _move(s){const l=this._view.state.camera,p=(new c).copyFrom(l),h=t(s.data.x,s.data.y);if(this._view.state.isGlobal){const t=m(this._view,this._view.state.camera,h,r(this._view.spatialReference).radius,1,{});if(null==t.scenePickPoint||!t.hasGeometryIntersection)return;e(this._tmpTargetLocation,t.scenePickPoint)}else{if(!this._view.sceneIntersectionHelper.intersectScreenFreePointFallback(h,this._tmpTargetLocation,{}))return}i(this._tmpTranslation,this._tmpTargetLocation,l.eye),a(this._tmpTranslation,this._tmpTranslation,f,_),o(this._tmpTargetLocation,l.eye,this._tmpTranslation),i(this._tmpCenterOffset,p.center,p.eye),p.eye=this._tmpTargetLocation,p.center=o(this._tmpCenterOffset,this._tmpTargetLocation,this._tmpCenterOffset),this._offsetCorrectionController.immediatelyCorrectGroundElevation(p,g),await this._view.goTo(n(this._view,p),{liftOffDisabled:!0,duration:u})}}export{d as GroundDoubleClickMove};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{ignoreAbortErrors as n}from"../../../../../core/promiseUtils.js";import{syncAndInitial as a,when as s}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as p}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as g}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as h}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as m}from"../../SnappingVisualizer3D.js";import{screenToMap3D as d,hideManipulatorWhileDragging as u}from"../../editingTools/dragEventPipeline3D.js";import c from"./AreaMeasurement3DView.js";import{PickRequest as y}from"../support/PickRequest.js";import{AnalysisToolBase as _}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as v}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as w}from"../../../../interactive/dragEventPipeline.js";import{sketchKeys as f}from"../../../../interactive/keybindings.js";import{ManipulatorCollection as S}from"../../../../interactive/ManipulatorCollection.js";import{EditGeometry as P}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as V}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as M}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as D}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as j}from"../../../../interactive/snapping/SnappingManagerPool.js";import{SnappingOperation as x}from"../../../../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as
|
|
2
|
+
import{__decorate as t}from"tslib";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{ignoreAbortErrors as n}from"../../../../../core/promiseUtils.js";import{syncAndInitial as a,when as s}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as p}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as g}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as h}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as m}from"../../SnappingVisualizer3D.js";import{screenToMap3D as d,hideManipulatorWhileDragging as u}from"../../editingTools/dragEventPipeline3D.js";import c from"./AreaMeasurement3DView.js";import{PickRequest as y}from"../support/PickRequest.js";import{AnalysisToolBase as _}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as v}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as w}from"../../../../interactive/dragEventPipeline.js";import{sketchKeys as f}from"../../../../interactive/keybindings.js";import{ManipulatorCollection as S}from"../../../../interactive/ManipulatorCollection.js";import{EditGeometry as P}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as V}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as M}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as D}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as j}from"../../../../interactive/snapping/SnappingManagerPool.js";import{SnappingOperation as x}from"../../../../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as k}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as O}from"../../../../support/screenUtils.js";let b=class extends _{constructor(t){super(t),this._updatingHandles=new p,this._snappingManagerResult=null,this.polygonState="initial",this.removeIncompleteOnCancel=!1,this.manipulators=new S,this._getSnappingContext=i(t=>new M({elevationInfo:{mode:"absolute-height",offset:0},pointer:t,editGeometryOperations:new V(new P("point",v(!0,!1,this.view.spatialReference)),this.view.state.viewingMode),visualizer:new m}))}initialize(){const{view:t,analysisViewData:e,manipulators:i,visible:o}=this;this.measurementView=new c({view:t,analysisViewData:e,toolState:this,manipulators:i,visible:o}),this._snappingOperation=new x({view:t}),this._updatingHandles.add(()=>this.stagedPoint,t=>{this.analysisViewData.stagedPoint=null!=t?g(t,new l):null},a),k(this,()=>{const t=this.view.inputManager.latestPointerInfo?.type??"mouse",e=this._getSnappingContext(t);this._updatingHandles.consumePromise(n(this._snappingOperation.snapAgainNearPreviousMapPoint(this._ensureSnappingManager(),e)))}),this._setupManipulators(),this.addHandles([s(()=>"measured"===this.state,()=>this.finishToolCreation(),a),this.analysisViewData.path.on("change",()=>{const t=this.analysisViewData.path;"initial"!==this.polygonState||t.isEmptyPolygon||(t.isValidPolygon?this.polygonState="measured":this.polygonState="drawing")})])}destroy(){this.measurementView.destroy(),this._set("measurementView",null),this._updatingHandles=e(this._updatingHandles)}get _snappingManager(){return this._snappingManagerResult?.snappingManager}_ensureSnappingManager(){if(null==this._snappingManagerResult){const t=j(this.view);this._snappingManagerResult=t,this.addHandles(t)}return this._snappingManagerResult.snappingManager}get state(){return 0===this.analysisViewData.path.numVertices?"ready":this.analysisViewData.path.isValidPolygon&&"editing"!==this.polygonState?"measured":"measuring"}get cursor(){return this.active?"crosshair":null}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}get stagedPoint(){return this._snappingOperation.stagedPoint}set stagedPoint(t){this._snappingOperation.stagedPoint=t}get snappingOptions(){return this._snappingManager?.options}finishMeasurement(){const{path:t}=this.analysisViewData;t.numVertices<=2||(t.close(),this.polygonState="measured",this._resetSnappingState(),this.active&&(this.view.activeTool=null))}resetCreated(){super.resetCreated(),this._resetSnappingState(),this.polygonState="initial","measured"===this.state&&(this.polygonState="measured",this.finishToolCreation())}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onDeactivate(){this._resetSnappingState()}onInputEvent(t){switch(t.type){case"immediate-double-click":this._handleImmediateDoubleClick(t);break;case"immediate-click":this._handleImmediateClick(t);break;case"pointer-move":this._handlePointerMove(t);break;case"drag":this._handleDrag(t);break;case"key-down":this._handleKeyDown(t)}}_setupManipulators(){const t=t=>t.events.on("grab-changed",()=>{if(this.analysisViewData.path.isValidPolygon){const t=this.manipulators.some(t=>t.manipulator.grabbing);this.polygonState=t?"editing":"measured"}}),e=e=>{this.addHandles([w(e,(t,e,i,n)=>{const a=u(t),s=t.metadata,o=this._snappingManager,r=this._getSnappingContext(n),p=this._updatingHandles,{snappingStep:l,cancelSnapping:h}=D({snappingManager:o,snappingContext:r,updatingHandles:p});i.next(a).next(e=>(this.analysisViewData.lastDraggedVertex=null,this.analysisViewData.path.setVertexPosition(s,m),t.location=m,e)).next(h),e.next(a).next(d(this.view)).next(...l).next(e=>{t.location=e.mapEnd,this.analysisViewData.lastDraggedVertex="end"===e.action?null:s,this.analysisViewData.path.setVertexPosition(s,g(e.mapEnd))});const m=g(this.analysisViewData.path.getVertexPositionAsPoint(s))}),t(e)],e)};this.manipulators.forEach(({manipulator:t})=>{e(t)}),this.addHandles([this.manipulators.on("after-add",({item:{manipulator:t}})=>{e(t)}),this.manipulators.on("after-remove",({item:{manipulator:t}})=>this.removeHandles(t))])}_handleImmediateDoubleClick(t){h(t)&&("drawing"===this.polygonState&&this.finishMeasurement(),t.stopPropagation())}_handleDrag(t){"editing"===this.polygonState&&t.stopPropagation()}_handleImmediateClick(t){if(!h(t))return;const e=O(t),{pointerType:i}=t;if(this.active)switch(this.polygonState){case"initial":case"measured":if(this._addVertexAt(e,i))return this.stagedPoint=null,this.polygonState="drawing",void t.stopPropagation();break;case"drawing":{const n=this.measurementView.vertexHandleAt(e,i);if(null==n){if(this._addVertexAt(e,i))return this.stagedPoint=null,void t.stopPropagation()}else 0===n.index&&(this.finishMeasurement(),t.stopPropagation());break}}"mouse"===t.pointerType&&this._hoverAt(e)}_handlePointerMove(t){if("mouse"===t.pointerType){const e=O(t);this._hoverAt(e)}}_handleKeyDown(t){const{path:e}=this.analysisViewData;(t.key===f.cancel||t.key===f.complete)&&"drawing"===this.polygonState&&e.numVertices>=3&&(this.stagedPoint=null,this.finishMeasurement(),t.stopPropagation())}_hoverAt(t){const{polygonState:e}=this;if(this.active&&C.has(e)){const e=this._pick(t);if(null!=e?.mapPoint){const t=this._getSnappingContext("mouse");this._updatingHandles.consumePromise(n(this._snappingOperation.snap({point:e.mapPoint},this._ensureSnappingManager(),t)))}}else this.stagedPoint=null}_addVertexAt(t,e){const i=this._pick(t),n=i?.mapPoint;if(null==n)return!1;this.analysis.valid&&"measured"===this.polygonState&&(this.analysis.clear(),this._set("created",!1),this.polygonState="initial");const a=this._getSnappingContext(e),s=this._snappingOperation.update({point:n},this._ensureSnappingManager(),a),o=g(s,new l);return this.analysisViewData.path.add(o),!0}_pick(t){const e=new y(t);return this.measurementView.pick(e)}_resetSnappingState(){this._ensureSnappingManager().doneSnapping(),this._snappingOperation.abort(),this._snappingOperation.stagedPoint=null}get test(){}};t([o()],b.prototype,"_snappingManagerResult",void 0),t([o()],b.prototype,"_snappingManager",null),t([o({readOnly:!0})],b.prototype,"state",null),t([o()],b.prototype,"polygonState",void 0),t([o({readOnly:!0})],b.prototype,"cursor",null),t([o()],b.prototype,"measurementView",void 0),t([o()],b.prototype,"removeIncompleteOnCancel",void 0),t([o({constructOnly:!0})],b.prototype,"view",void 0),t([o({constructOnly:!0})],b.prototype,"analysis",void 0),t([o({constructOnly:!0})],b.prototype,"analysisViewData",void 0),t([o({readOnly:!0})],b.prototype,"manipulators",void 0),t([o()],b.prototype,"updating",null),t([o()],b.prototype,"stagedPoint",null),t([o()],b.prototype,"snappingOptions",null),b=t([r("esri.views.3d.interactive.measurementTools.areaMeasurement3D.AreaMeasurement3DTool")],b);const C=new Set(["initial","drawing","measured"]),H=b;export{H as default};
|
package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{when as n,syncAndInitial as a,watch as s}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../../core/support/UpdatingHandles.js";import u from"../../../../../geometry/Point.js";import{clonePoint as p}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as c}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as d}from"../../SnappingVisualizer3D.js";import{screenToMap3D as h,hideManipulatorWhileDragging as m}from"../../editingTools/dragEventPipeline3D.js";import{DirectLineMeasurement3DView as g}from"./DirectLineMeasurement3DView.js";import{getElevationAtPoint as v}from"../../../support/ElevationProvider.js";import{AnalysisToolBase as P}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as y}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as f,resetProperties as w}from"../../../../interactive/dragEventPipeline.js";import{EditGeometry as _}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as M}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as S}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as D}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as j}from"../../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as b}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as L}from"../../../../support/screenUtils.js";let x=class extends P{constructor(t){super(t),this._updatingHandles=new l,this._snappingManagerResult=null,this._emulatedDrag=null,this.lineState="initial",this.removeIncompleteOnCancel=!1,this.startPointSurfaceLocation=null,this.endPointSurfaceLocation=null,this.cursorPointSurfaceLocation=null,this.startManipulator=null,this.endManipulator=null,this.cursorManipulator=null,this._getSnappingContext=i(t=>new S({elevationInfo:{mode:"absolute-height",offset:0},pointer:t,editGeometryOperations:new M(new _("point",y(!0,!1,this.view.spatialReference)),this.view.state.viewingMode),visualizer:new d}))}initialize(){const{view:t,analysis:e,analysisViewData:i,visible:r}=this;this.measurementView=new g({toolState:this,view:t,analysis:e,analysisViewData:i,visible:r});const{start:o,end:l,cursor:c}=this.measurementView.createManipulators(),d=(t,e,i)=>{const n=f(t,(t,n,a,s)=>{const r=m(t),o=this._ensureSnappingManager(),l=this._getSnappingContext(s),c=this._updatingHandles,{lineState:d}=this;a=a.next(r).next(w(this,[i,e])).next(i=>{if("cursorPoint"!==e){const i=this.analysis[e];null!=i&&(t.location=i)}return i});const g=h(this.view),v=t=>{const n=g(t);return n||"drawing"!==this.lineState&&"initial"!==this.lineState||(this[e]=null,this[i]=null),n};let P=n.next(r).next(v);if("touch"!==s||"editing"===d){const{snappingStep:t,cancelSnapping:e}=D({snappingManager:o,snappingContext:l,updatingHandles:c});a.next(e),P=P.next(...t)}P.next(t=>"start"!==t.action?t:null).next(n=>{const a=p(n.mapEnd,new u);this[e]=a,t.location=a,this[i]=this._surfaceLocation(a,n.surfaceType)})});return"cursorPoint"===e?[n]:[n,t.events.on("grab-changed",()=>{const t=o.grabbing||l.grabbing;this.lineState=t?"editing":"measured"}),this._updatingHandles.add(()=>this.analysis[e],e=>{e&&(t.location=e)})]};this.startManipulator=o,this.endManipulator=l,this.cursorManipulator=c,this.manipulators.add(o),this.manipulators.add(l),this.manipulators.add(c),this.addHandles([...d(o,"startPoint","startPointSurfaceLocation"),...d(l,"endPoint","endPointSurfaceLocation"),...d(c,"cursorPoint","cursorPointSurfaceLocation"),n(()=>"measured"===this.state,()=>{this.finishToolCreation(),this.active&&(this.view.activeTool=null)},a),s(()=>({startPointAvailable:null!=this.startPoint,endPointAvailable:null!=this.endPoint}),({startPointAvailable:t,endPointAvailable:e})=>{this.startManipulator.available=t,this.endManipulator.available=e},a)]),b(this)}destroy(){this._updatingHandles=e(this._updatingHandles),this.measurementView=e(this.measurementView)}get _snappingManager(){return this._snappingManagerResult?.snappingManager}_ensureSnappingManager(){if(null==this._snappingManagerResult){const t=j(this.view);this._snappingManagerResult=t,this.addHandles(t)}return this._snappingManagerResult.snappingManager}get state(){const{analysis:t}=this;if(null==t.startPoint&&null==t.endPoint)return"ready";const{lineState:e}=this;return this.validMeasurement&&"editing"!==e&&"drawing"!==e?"measured":"measuring"}get cursor(){return!this.active||"ready"!==this.state&&"measured"===this.lineState?null:"crosshair"}get startPoint(){return this.analysis.startPoint}set startPoint(t){this.analysis.startPoint=t}get endPoint(){return this.analysis.endPoint}set endPoint(t){this.analysis.endPoint=t}get cursorPoint(){return this.measurementView.cursorPoint}set cursorPoint(t){this.measurementView.cursorPoint=t}get snappingOptions(){return this._snappingManager?.options}get validMeasurement(){return null!=this.analysis.startPoint&&null!=this.analysis.endPoint}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}resetCreated(){super.resetCreated(),this.lineState="initial",this.cursorPoint=null,"measured"===this.state&&this.finishToolCreation()}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onDeactivate(){this._emulatedDrag?.cancel(),this._emulatedDrag=null}onInputEvent(t){switch(t.type){case"immediate-click":this._handleImmediateClick(t);break;case"pointer-move":this._handlePointerMove(t)}}_handlePointerMove(t){if(!this.active||this.view.navigating)return;const{pointerType:e}=t;if("mouse"!==e)return;const i=L(t),{lineState:n,cursorManipulator:a,endManipulator:s}=this;let r=!1;null==this.cursorPoint&&(this._emulatedDrag?.cancel(),this._emulatedDrag=V(a,e,i),r=!0),"initial"===n&&(this._emulatedDrag?.update(i),r=!0),"drawing"===n&&(s.events.emit("drag",{action:"update",start:i,screenPoint:i}),r=!0),r&&t.stopPropagation()}_handleImmediateClick(t){if(!this.active||!c(t))return;const e=L(t),{pointerType:i}=t,{cursorManipulator:n,startManipulator:a,endManipulator:s,lineState:r}=this;let o=!1;switch(null==this.cursorPoint&&(this._emulatedDrag?.cancel(),this._emulatedDrag=V(n,i,e)),r){case"initial":if(this._emulatedDrag?.update(e),null!=this.cursorPoint){this._emulatedDrag?.end(e),this._emulatedDrag=null,this.
|
|
2
|
+
import{__decorate as t}from"tslib";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{when as n,syncAndInitial as a,watch as s}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../../core/support/UpdatingHandles.js";import u from"../../../../../geometry/Point.js";import{clonePoint as p}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as c}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as d}from"../../SnappingVisualizer3D.js";import{screenToMap3D as h,hideManipulatorWhileDragging as m}from"../../editingTools/dragEventPipeline3D.js";import{DirectLineMeasurement3DView as g}from"./DirectLineMeasurement3DView.js";import{getElevationAtPoint as v}from"../../../support/ElevationProvider.js";import{AnalysisToolBase as P}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as y}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as f,resetProperties as w}from"../../../../interactive/dragEventPipeline.js";import{EditGeometry as _}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as M}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as S}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as D}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as j}from"../../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as b}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as L}from"../../../../support/screenUtils.js";let x=class extends P{constructor(t){super(t),this._updatingHandles=new l,this._snappingManagerResult=null,this._emulatedDrag=null,this.lineState="initial",this.removeIncompleteOnCancel=!1,this.startPointSurfaceLocation=null,this.endPointSurfaceLocation=null,this.cursorPointSurfaceLocation=null,this.startManipulator=null,this.endManipulator=null,this.cursorManipulator=null,this._getSnappingContext=i(t=>new S({elevationInfo:{mode:"absolute-height",offset:0},pointer:t,editGeometryOperations:new M(new _("point",y(!0,!1,this.view.spatialReference)),this.view.state.viewingMode),visualizer:new d}))}initialize(){const{view:t,analysis:e,analysisViewData:i,visible:r}=this;this.measurementView=new g({toolState:this,view:t,analysis:e,analysisViewData:i,visible:r});const{start:o,end:l,cursor:c}=this.measurementView.createManipulators(),d=(t,e,i)=>{const n=f(t,(t,n,a,s)=>{const r=m(t),o=this._ensureSnappingManager(),l=this._getSnappingContext(s),c=this._updatingHandles,{lineState:d}=this;a=a.next(r).next(w(this,[i,e])).next(i=>{if("cursorPoint"!==e){const i=this.analysis[e];null!=i&&(t.location=i)}return i});const g=h(this.view),v=t=>{const n=g(t);return n||"drawing"!==this.lineState&&"initial"!==this.lineState||(this[e]=null,this[i]=null),n};let P=n.next(r).next(v);if("touch"!==s||"editing"===d){const{snappingStep:t,cancelSnapping:e}=D({snappingManager:o,snappingContext:l,updatingHandles:c});a.next(e),P=P.next(...t)}P.next(t=>"start"!==t.action?t:null).next(n=>{const a=p(n.mapEnd,new u);this[e]=a,t.location=a,this[i]=this._surfaceLocation(a,n.surfaceType)})});return"cursorPoint"===e?[n]:[n,t.events.on("grab-changed",()=>{const t=o.grabbing||l.grabbing;this.lineState=t?"editing":"measured"}),this._updatingHandles.add(()=>this.analysis[e],e=>{e&&(t.location=e)})]};this.startManipulator=o,this.endManipulator=l,this.cursorManipulator=c,this.manipulators.add(o),this.manipulators.add(l),this.manipulators.add(c),this.addHandles([...d(o,"startPoint","startPointSurfaceLocation"),...d(l,"endPoint","endPointSurfaceLocation"),...d(c,"cursorPoint","cursorPointSurfaceLocation"),n(()=>"measured"===this.state,()=>{this.finishToolCreation(),this.active&&(this.view.activeTool=null)},a),s(()=>({startPointAvailable:null!=this.startPoint,endPointAvailable:null!=this.endPoint}),({startPointAvailable:t,endPointAvailable:e})=>{this.startManipulator.available=t,this.endManipulator.available=e},a)]),b(this)}destroy(){this._updatingHandles=e(this._updatingHandles),this.measurementView=e(this.measurementView)}get _snappingManager(){return this._snappingManagerResult?.snappingManager}_ensureSnappingManager(){if(null==this._snappingManagerResult){const t=j(this.view);this._snappingManagerResult=t,this.addHandles(t)}return this._snappingManagerResult.snappingManager}get state(){const{analysis:t}=this;if(null==t.startPoint&&null==t.endPoint)return"ready";const{lineState:e}=this;return this.validMeasurement&&"editing"!==e&&"drawing"!==e?"measured":"measuring"}get cursor(){return!this.active||"ready"!==this.state&&"measured"===this.lineState?null:"crosshair"}get startPoint(){return this.analysis.startPoint}set startPoint(t){this.analysis.startPoint=t}get endPoint(){return this.analysis.endPoint}set endPoint(t){this.analysis.endPoint=t}get cursorPoint(){return this.measurementView.cursorPoint}set cursorPoint(t){this.measurementView.cursorPoint=t}get snappingOptions(){return this._snappingManager?.options}get validMeasurement(){return null!=this.analysis.startPoint&&null!=this.analysis.endPoint}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}resetCreated(){super.resetCreated(),this.lineState="initial",this.cursorPoint=null,"measured"===this.state&&this.finishToolCreation()}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onDeactivate(){this._emulatedDrag?.cancel(),this._emulatedDrag=null}onInputEvent(t){switch(t.type){case"immediate-click":this._handleImmediateClick(t);break;case"pointer-move":this._handlePointerMove(t)}}_handlePointerMove(t){if(!this.active||this.view.navigating)return;const{pointerType:e}=t;if("mouse"!==e)return;const i=L(t),{lineState:n,cursorManipulator:a,endManipulator:s}=this;let r=!1;null==this.cursorPoint&&(this._emulatedDrag?.cancel(),this._emulatedDrag=V(a,e,i),r=!0),"initial"===n&&(this._emulatedDrag?.update(i),r=!0),"drawing"===n&&(s.events.emit("drag",{action:"update",start:i,screenPoint:i}),r=!0),r&&t.stopPropagation()}_handleImmediateClick(t){if(!this.active||!c(t))return;const e=L(t),{pointerType:i}=t,{cursorManipulator:n,startManipulator:a,endManipulator:s,lineState:r}=this;let o=!1;switch(null==this.cursorPoint&&(this._emulatedDrag?.cancel(),this._emulatedDrag=V(n,i,e)),r){case"initial":if(this._emulatedDrag?.update(e),null!=this.cursorPoint){this._emulatedDrag?.end(e),this._emulatedDrag=null,this.analysis.valid&&(this.analysis.clear(),this._set("created",!1));const{cursorPoint:t}=this;this.startPoint=t,this.startPointSurfaceLocation=this.cursorPointSurfaceLocation,a.location=t,a.interactive=!1,s.interactive=!1,this.lineState="drawing",this._emulatedDrag=V(s,i,e),o=!0}break;case"drawing":this._emulatedDrag?.update(e),null!=this.endPoint&&(this._emulatedDrag?.end(e),this._emulatedDrag=null,a.interactive=!0,s.interactive=!0,this.lineState="measured",o=!0)}o&&t.stopPropagation()}_surfaceLocation(t,e){return 0===e?"on-the-surface":(t.z??0)>=this._getElevation(t)?"above-the-surface":"below-the-surface"}_getElevation(t){return this.view.groundView?.ready?v(this.view.elevationProvider,t)??0:0}get test(){}};function V(t,e,i){return t.events.emit("drag",{action:"start",pointerType:e,start:i,screenPoint:i}),{update:e=>t.events.emit("drag",{action:"update",start:e,screenPoint:e}),end:e=>t.events.emit("drag",{action:"end",start:e,screenPoint:e}),cancel:()=>t.events.emit("drag",{action:"cancel"})}}t([r()],x.prototype,"_snappingManagerResult",void 0),t([r()],x.prototype,"_snappingManager",null),t([r({readOnly:!0})],x.prototype,"state",null),t([r()],x.prototype,"lineState",void 0),t([r({readOnly:!0})],x.prototype,"cursor",null),t([r()],x.prototype,"startPoint",null),t([r()],x.prototype,"endPoint",null),t([r()],x.prototype,"cursorPoint",null),t([r({constructOnly:!0})],x.prototype,"analysis",void 0),t([r({constructOnly:!0})],x.prototype,"analysisViewData",void 0),t([r()],x.prototype,"measurementView",void 0),t([r()],x.prototype,"removeIncompleteOnCancel",void 0),t([r({constructOnly:!0})],x.prototype,"view",void 0),t([r({readOnly:!0})],x.prototype,"validMeasurement",null),t([r({value:null})],x.prototype,"startPointSurfaceLocation",void 0),t([r({value:null})],x.prototype,"endPointSurfaceLocation",void 0),t([r({value:null})],x.prototype,"cursorPointSurfaceLocation",void 0),t([r()],x.prototype,"updating",null),x=t([o("esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DTool")],x);const C=x;export{C as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import o from"../../../../Camera.js";import{clock as r}from"../../../../core/clock.js";import i from"../../../../core/Logger.js";import{rad2deg as e}from"../../../../core/mathUtils.js";import{onAbort as s}from"../../../../core/promiseUtils.js";import{createScreenPointArray as n}from"../../../../core/screenUtils.js";import{property as a,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{subtract as l,add as m,copy as h,cross as p,normalize as u,scale as d,dot as v}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"../../../../geometry/Point.js";import{shortenTranslation as g}from"../../state/utils/groundNavigationUtils.js";import{OffsetCorrectionController as w}from"../../state/utils/OffsetCorrectionController.js";import y from"../../webgl/RenderCamera.js";import{InteractiveToolBase as T}from"../../../interactive/InteractiveToolBase.js";const C=2,M=.99,j=500;let D=class extends T{constructor(t){super(t),this.isGroundNavigationPlacementTool=!0,this._internalAbortController=new AbortController,this._tmpMouseDirection=_(),this._tmpWorldUp=_(),this._tmpHorizontalForward=_(),this._tmpTranslation=_(),this._tmpScratchVector=_(),this._hasErrorCursor=!1}initialize(){this.signal&&this.addHandles([s(this.signal,()=>{this.cancel(),this.active&&(this.view.activeTool=null)})]),this.finishToolCreation()}cancel(){super.cancel(),this._internalAbortController?.abort()}onDeactivate(){this.emit("cancel")}get cursor(){return this.active?this._hasErrorCursor?"not-allowed":"crosshair":null}async onInputEvent(t){if(!this.active||"immediate-click"!==t.type)return;t.stopPropagation();const r=this.view.state.camera,e=this.view.sceneIntersectionHelper,s=_();if(!e.intersectScreen(n(t.x,t.y),s))return i.getLogger(this).warn("The clicked location did not produce a valid target. Try again by clicking in a different location."),void this._showErrorCursor();if(l(this._tmpTranslation,s,r.eye),g(this._tmpTranslation,this._tmpTranslation,M,C),m(s,r.eye,this._tmpTranslation),this.groundMode?.offset){const t=(new y).copyFrom(r);t.eye=s;new w(this.view).immediatelyCorrectGroundElevation(t,void 0,void 0,this.groundMode),h(s,t.eye)}const a=this.cameraTurningEnabled?this._computeHeadingOffset(r,s):0,c=this.view.renderCoordsHelper.fromRenderCoords(s,new f({spatialReference:this.view.spatialReference})),p=new o({position:c,heading:this.view.camera.heading+a,tilt:85});this.emit("success",p),this.view.activeTool=null}_computeHeadingOffset(t,o){const r=this.view.renderCoordsHelper.worldUpAtPosition(o,this._tmpWorldUp),i=p(this._tmpHorizontalForward,r,t.viewRight);l(this._tmpMouseDirection,o,t.eye),u(this._tmpMouseDirection,this._tmpMouseDirection),l(this._tmpMouseDirection,this._tmpMouseDirection,d(this._tmpScratchVector,r,v(r,this._tmpMouseDirection))),u(this._tmpMouseDirection,this._tmpMouseDirection);const s=p(_(),this._tmpMouseDirection,i),n=Math.sign(v(s,r)),a=Math.acos(v(this._tmpMouseDirection,i));return n*e(a)}_showErrorCursor(){this._hasErrorCursor=!0,this._errorTimeout?.remove(),this._errorTimeout=r.setTimeout(()=>{this._hasErrorCursor=!1,this._errorTimeout=void 0},j)}};t([a({constructOnly:!0})],D.prototype,"view",void 0),t([a({constructOnly:!0})],D.prototype,"signal",void 0),t([a({constructOnly:!0})],D.prototype,"cameraTurningEnabled",void 0),t([a({constructOnly:!0})],D.prototype,"groundMode",void 0),t([a()],D.prototype,"_hasErrorCursor",void 0),t([a({readOnly:!0})],D.prototype,"cursor",null),D=t([c("esri.views.3d.interactive.placementTools.GroundNavigationPlacementTool3D")],D);export{D as GroundNavigationPlacementTool3D};
|
|
@@ -7,10 +7,17 @@ import type { NavigationMode3DUnion } from "./modes/NavigationMode3DUnion.js";
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export abstract class Navigation3D extends Navigation {
|
|
10
|
+
/** @internal */
|
|
11
|
+
get isInPlacementMode(): boolean;
|
|
10
12
|
/**
|
|
11
13
|
* The mode that is currently active for user-controlled navigation.
|
|
12
14
|
*
|
|
13
15
|
* @internal
|
|
14
16
|
*/
|
|
15
17
|
accessor mode: NavigationMode3DUnion;
|
|
18
|
+
/**
|
|
19
|
+
* @param zoomIn - Whether to zoom in (true) or out (false)
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
zoom(zoomIn: boolean): Promise<void>;
|
|
16
23
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{ignoreAbortErrors as t}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import{DefaultNavigationMode3D as s}from"./modes/DefaultNavigationMode3D.js";import{groundNavigationAdvance as a}from"../state/utils/groundNavigationUtils.js";import n from"../../navigation/Navigation.js";let m=class extends n{constructor(o){super(o),this.mode=new s,this.addHandles([i(()=>this.mode,(o,t)=>{t?.detach(),o.attach(this.view)},{sync:!0,initial:!0})])}zoom(o){switch(this.mode.type){case"default":return t(this.view.goTo({zoomFactor:o?2:.5}));case"ground":return t(a(this.view,o?5:-5));default:this.mode}throw new Error(`Unknown navigation mode while calling navigation3D.zoom: ${this.mode}`)}};o([e({constructOnly:!0})],m.prototype,"view",void 0),o([e()],m.prototype,"mode",void 0),m=o([r("esri.views.3d.navigation.Navigation3D")],m);export{m as Navigation3D};
|
|
2
|
+
import{__decorate as o}from"tslib";import{ignoreAbortErrors as t}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import{DefaultNavigationMode3D as s}from"./modes/DefaultNavigationMode3D.js";import{groundNavigationAdvance as a}from"../state/utils/groundNavigationUtils.js";import n from"../../navigation/Navigation.js";let m=class extends n{constructor(o){super(o),this.mode=new s,this.addHandles([i(()=>this.mode,(o,t)=>{t?.detach(),o.attach(this.view)},{sync:!0,initial:!0})])}get isInPlacementMode(){const{activeTool:o}=this.view;return!!o&&"isGroundNavigationPlacementTool"in o}zoom(o){switch(this.mode.type){case"default":return t(this.view.goTo({zoomFactor:o?2:.5}));case"ground":return t(a(this.view,o?5:-5));default:this.mode}throw new Error(`Unknown navigation mode while calling navigation3D.zoom: ${this.mode}`)}};o([e({constructOnly:!0})],m.prototype,"view",void 0),o([e()],m.prototype,"mode",void 0),o([e()],m.prototype,"isInPlacementMode",null),m=o([r("esri.views.3d.navigation.Navigation3D")],m);export{m as Navigation3D};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type Camera from "../../../../Camera.js";
|
|
2
|
+
import type { AbortOptions } from "../../../../core/promiseUtils.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* @param view
|
|
7
|
+
* @param groundMode
|
|
8
|
+
* @param cameraturningEnabled whether the camera should turn towards the click point
|
|
9
|
+
*/
|
|
10
|
+
export interface GroundNavigationPlacementOptions extends AbortOptions {}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param options
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export function startGroundNavigationPlacement(options: GroundNavigationPlacementOptions): Promise<Camera>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @param view
|
|
21
|
+
* @param backDistance
|
|
22
|
+
* @param upDistance
|
|
23
|
+
*/
|
|
24
|
+
export interface GroundNavigationExitOptions {}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new camera that can be transitioned to for a smooth exit from the ground mode.
|
|
28
|
+
*
|
|
29
|
+
* @param options
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export function constructGroundNavigationExitCamera(options: GroundNavigationExitOptions): Camera;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"../../../../Camera.js";import{rad2deg as t}from"../../../../core/mathUtils.js";import{crossAndNormalize as o,scaleAndAdd as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import n from"../../../../geometry/Point.js";import{GroundNavigationPlacementTool3D as i}from"../../interactive/placementTools/GroundNavigationPlacementTool3D.js";const s=70,c=30;async function m(e){return new Promise((t,o)=>{const r=new i(e);r.addHandles([r.on("success",e=>t(e)),r.on("cancel",()=>o())]),e.view.addAndActivateTool(r)})}const l=a(),d=a(),p=a();function f(a){const{view:i,backDistance:m,upDistance:f}=a;i.renderCoordsHelper.worldUpAtPosition(i.state.camera.eye,d),o(p,d,i.state.camera.viewRight);const v=m??s,w=f??c;r(l,i.state.camera.eye,p,-v),r(l,l,d,w);const g=i.renderCoordsHelper.fromRenderCoords(l,new n({spatialReference:i.spatialReference}));return new e({position:g,heading:i.camera.heading,tilt:t(Math.atan(Math.abs(v/w)))})}export{f as constructGroundNavigationExitCamera,m as startGroundNavigationPlacement};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../core/Logger.js";import{createScreenPointArray as t}from"../../../../core/screenUtils.js";import{distance as n,normalize as r,cross as o,add as i,crossAndNormalize as a,subtract as s,dot as c,scaleAndAdd as l,scale as u,copy as m,length as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as f}from"../../../../geometry/ellipsoidUtils.js";import{create as g,fromPositionAndNormal as h,distance as w,projectPoint as y,projectVector as P}from"../../../../geometry/support/plane.js";import{create as j}from"../../../../geometry/support/ray.js";import{Sphere as S}from"../../../../geometry/support/sphere.js";import{fromRenderCamera as v}from"../../webgl.js";import{getVoxelWasm as I}from"../../layers/VoxelWasm.js";import{pickPointAndInitSphere as b,searchAreaSize as
|
|
2
|
+
import e from"../../../../core/Logger.js";import{createScreenPointArray as t}from"../../../../core/screenUtils.js";import{distance as n,normalize as r,cross as o,add as i,crossAndNormalize as a,subtract as s,dot as c,scaleAndAdd as l,scale as u,copy as m,length as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as f}from"../../../../geometry/ellipsoidUtils.js";import{create as g,fromPositionAndNormal as h,distance as w,projectPoint as y,projectVector as P}from"../../../../geometry/support/plane.js";import{create as j}from"../../../../geometry/support/ray.js";import{Sphere as S}from"../../../../geometry/support/sphere.js";import{fromRenderCamera as v}from"../../webgl.js";import{getVoxelWasm as I}from"../../layers/VoxelWasm.js";import{pickPointAndInitSphere as b,searchAreaSize as M,sphereOrPlanePointFromScreenPoint as z,intersectPlaneFromScreenPoint as x}from"./navigationUtils.js";import{OffsetCorrectionController as H}from"./OffsetCorrectionController.js";import{fromScreenAtEye as T}from"../../support/geometryUtils/ray.js";import k from"../../webgl/RenderCamera.js";import{Intersector as C}from"../../webgl-engine/lib/Intersector.js";const A=1.5,F={xSpeedMultiplier:A,ySpeedMultiplier:A,maxElevation:1e4,relativeHorizonPadding:.1,minimumHorizonPadding:12},O=2,G=.25,N=p(),R=p(),q=t(),U=p(),Y=g(),D=p(),E=p(),L=p(),V=p(),_=p(),W=p(),B=p(),J=p(),K=p(),Q=p(),X=t(),Z=j(),$=new S,ee=p(),te=g(),ne=p(),re=p();function oe(e,t){return P(t,e.viewForward,N),i(R,e.eye,N),e.projectToScreen(R,q),q[1]}function ie(e,t,m){const d=e.eye;if(n(t.center,d)<t.radius)return r(_,d),o(W,_,e.viewRight),i(R,d,W),e.projectToScreen(R,X),X[1];const p=e.up;T(e,m,Z);const f=t.radius;if(a(U,p,Z.direction),h(d,U,Y),w(Y,t.center)>f)return null;y(Y,t.center,D);const g=n(t.center,D),P=Math.sqrt(f**2-g**2);s(E,d,D),r(L,E),a(V,U,L);const j=c(E,L),S=c(E,V),v=Math.sqrt(j**2+S**2),I=P**2/v**2,b=P/v**2*Math.sqrt(v**2-P**2),M=I*j,z=b*-S,x=I*S,H=b*j,k=M-z,C=x+H,A=x-H;i(B,D,l(B,u(B,L,M+z),V,C)),i(J,D,l(J,u(J,L,k),V,A)),s(K,B,d),r(K,K),s(Q,J,d),r(Q,Q);return c(e.viewForward,K)>=c(e.viewForward,Q)?e.projectToScreen(B,X):e.projectToScreen(J,X),X[1]}function ae(e,t,n=!0){return n?e<t:e<=t}function se(e,t,n=!0){return n?e>t:e>=t}function ce(e,t,n){return t?e>n:e<n}function le(e,t){const n=e.fullHeight/e.pixelRatio,r=Math.max(t,n-t);return Math.max(F.minimumHorizonPadding,F.relativeHorizonPadding*r)}function ue(e,t){return[me(e,t),de(e,t)]}function me(e,t){const n=e.fullHeight/e.pixelRatio;return Math.min(n,t+le(e,t))}function de(e,t){return Math.max(0,t-le(e,t))}function pe(e,t,n){const r={translation:e,location:t};return n&&(r.normal=n),r}function fe(e){const{view:t}=e;return"global"===t.viewingMode?ge(e):he(e)}function ge(e){const{view:t,originalScreenPoint:o,horizonY:i,horizonPadding:a,outTranslation:s,outGrabLocation:c,outGrabNormal:l,intersectionOptions:u,depthSearchSize:d}=e,p=t.state.camera,g=pe(s,c,l);$.radius=f(t.spatialReference).radius;const h=b(t,p,o,$.radius,1,u);if(null==h.scenePickPoint)return!1;const w=h.hasGeometryIntersection;m(ee,h.scenePickPoint),m(g.location,ee);const y=h.sphere;g.normal&&h.normal&&m(g.normal,h.normal);const P=ye(o,i,a,w),j=w?n(ee,p.eye):Number.POSITIVE_INFINITY;if(P.wasAdjusted){je({view:t,screenAdjustment:P,intersector:Pe(t),fallbackCheck:(e,t,n)=>{const o=z(y,p,e,t);return o&&n&&r(n,t),o},output:g,intersectionOptions:u})}return ve({view:t,screenPoint:P.adjustedScreenPoint,camera:p,initialDistance:j,depthSearchSize:d??M,output:g}),!0}function he(e){const{view:t,originalScreenPoint:o,horizonY:i,horizonPadding:a,outTranslation:s,outGrabLocation:c,outGrabNormal:u,intersectionOptions:d,depthSearchSize:p}=e,f=t.sceneIntersectionHelper,g=t.state.camera,w=Pe(t),y=pe(s,c,u);f.intersectIntersectorScreen(o,w,d);const P=w.results.min.getIntersectionPoint(ee),j=P?n(ee,g.eye):Number.POSITIVE_INFINITY;P&&(m(y.location,ee),y.normal&&m(y.normal,w.results.min.normal)),t.renderCoordsHelper.worldUpAtPosition(g.eye,_),l(ne,g.eye,_,-g.relativeElevation),h(ne,_,te);const S=ye(o,i,a,P);if(S.wasAdjusted){je({view:t,screenAdjustment:S,intersector:w,fallbackCheck:(e,t,n)=>{const o=x(te,g,e,t);return o&&n&&r(n,_),o},output:y,intersectionOptions:d})}return ve({view:t,screenPoint:S.adjustedScreenPoint,camera:g,initialDistance:j,depthSearchSize:p??M,output:y}),!0}function we(e,t,n,r){return!r&&ae(e,t)||r&&ce(e,!1,n[0])?n[0]:!r&&se(e,t,!1)?n[1]:null}function ye(e,n,r,o){const i=we(e[1],n,r,o);return{originalScreenPoint:e,adjustedScreenPoint:t(e[0],i??e[1]),horizonY:n,horizonPadding:r,wasAdjusted:null!==i}}function Pe(e){const t=new C(e.state.viewingMode);return t.options.selectionMode=!0,t.options.store=0,t.options.hud=!1,t.options.normalRequired=!0,t}function je(e){const{view:t,screenAdjustment:n,fallbackCheck:r,intersector:o,output:i,intersectionOptions:a}=e,s=t.sceneIntersectionHelper;s.intersectIntersectorScreen(n.adjustedScreenPoint,o,{...a,requiresGroundFeedback:!0});let c=o.results.min.getIntersectionPoint(i.location);if(c)return void(i.normal&&m(i.normal,o.results.min.normal));const l=Se(n);s.intersectIntersectorScreen(l,o,{...a,requiresGroundFeedback:!0}),c=o.results.min.getIntersectionPoint(i.location),c?i.normal&&m(i.normal,o.results.min.normal):(c=r(n.adjustedScreenPoint,i.location,i.normal),c||r(l,i.location,i.normal))}function Se(e){const{originalScreenPoint:n,adjustedScreenPoint:r,horizonY:o,horizonPadding:i}=e,a=se(r[1],o)?Math.min(i[1],n[1]):Math.max(i[0],n[1]);return t(r[0],a)}function ve(e){const{view:t,screenPoint:n,camera:o,initialDistance:a,depthSearchSize:c,output:l}=e,m=c>0?t.stage.renderView.getMinimalDepthForArea(I(t),n[0],n[1],o,c):null;s(l.translation,l.location,o.eye);let p=Math.min(d(l.translation),a);m&&m<=p&&(p=m),r(l.translation,l.translation),u(l.translation,l.translation,p),i(l.location,l.translation,o.eye)}async function Ie(t,r){if("ground"!==t.navigation.mode.type)return void e.getLogger("esri").warn("Can only advance while in ground navigation mode!");const{camera:o}=t.state;t.renderCoordsHelper.worldUpAtPosition(o.eye,_);const c=t.sceneIntersectionHelper,l=Pe(t),p=a(N,_,o.viewRight);m(Z.origin,o.eye),u(Z.direction,p,r);const f=c.intersectRay(Z,l,ee),g=(new k).copyFrom(o),h=s(re,o.center,o.eye);if(!f||n(ee,o.eye)>r)g.eye=i(N,Z.origin,Z.direction);else{s(N,ee,o.eye);d(N)>O&&(be(N,N,G,O),g.eye=i(N,o.eye,N))}g.center=i(N,g.eye,h);return new H(t).immediatelyCorrectGroundElevation(g,100),t.goTo(v(t,g),{duration:500,liftOffDisabled:!0})}function be(e,t,n,r){const o=d(e),i=Math.min(n,Math.max(o-r,0)/o);u(t,e,i)}export{le as computeHorizonPadding,ue as computeHorizonPaddingLimits,fe as findGroundNavigationGrabLocation,oe as findPlaneHorizonY,ie as findSphereHorizonY,Ie as groundNavigationAdvance,F as groundNavigationConstants,ae as isAboveHorizon,se as isBelowHorizon,be as shortenTranslation,ce as shouldClampScreenY};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{watch as i}from"../../../../core/reactiveUtils.js";import{property as t,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o,set as n,positiveInfinity as h,equals as l}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as
|
|
2
|
+
import{__decorate as e}from"tslib";import{watch as i}from"../../../../core/reactiveUtils.js";import{property as t,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o,set as n,positiveInfinity as h,equals as l}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as p}from"../../webgl.js";import{addWraparound as u}from"../../layers/i3s/I3SUtil.js";import c from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as m,requiresPreciseColorDepth as d,prepareGaussianSplatPerspectiveParameters as _}from"./GaussianSplatRenderUtils.js";import{G as g}from"../../../../chunks/GaussianSplatColorComposition.glsl.js";import{GaussianSplatColorCompositionTechnique as f}from"../shaders/GaussianSplatColorCompositionTechnique.js";import{G as C}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as b}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{G as P}from"../../../../chunks/GaussianSplatEmissionComposition.glsl.js";import{GaussianSplatEmissionCompositionTechnique as S}from"../shaders/GaussianSplatEmissionCompositionTechnique.js";import{GaussianSplatPassParameters as q}from"../shaders/GaussianSplatPassParameters.js";import{GaussianSplatTechnique as w}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as v}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{ColorAttachment1 as R,DepthStencilAttachment as x,ColorAttachment0 as D,DrawBufferNone as y,PrimitiveType as E}from"../../../webgl/enums.js";let G=class extends c{constructor(e){super(e),this.consumes={required:[p.GAUSSIAN_SPLAT]},this.produces=p.GAUSSIAN_SPLAT,this._slicePlaneEnabled=!1,this.layerView=null,this._passParameters=new q,this._colorCompositionPassParameters=new g,this._emissionCompositionPassParameters=new P,this._depthCompositionPassParameters=new C,this._clipBox=o(),this._previousSortRequestCameraDirection=a(),this._cameraSortDirty=!1,this._tileCullingRevision=0,this._sortRequestDirectionEpsilon=.01,this._configuration=new v(e.view.state.isGlobal),n(this._clipBox,h)}async initialize(){this.addHandles([i(()=>this.view.state.camera,()=>this._onCameraChange()),i(()=>2===this.view.state.mode,e=>{e&&this._cameraSortDirty&&this._requestCameraSort(this.view.state.camera.ray.direction),this.requestRender(1)})])}precompile(){this._canRender&&(this._updateConfigurations(),this.techniques.precompile(w,this._configuration),this.techniques.precompile(f),this.bindParameters.hasOpaqueEmission&&this.techniques.precompile(S),this.techniques.precompile(b))}render(){const e=this.input;if(this._updateConfigurations(),this._fadeHelper.updateForFrame(this.view.stage.renderView.renderer.renderContext.time),!this._canRender)return e;const i=e.getAttachment(R),{fullWidth:t,fullHeight:s}=this.bindParameters.camera;this._prepareParameters();const r=this.renderingContext,a=this.fboCache.acquire(t,s,"gaussian color output"),o=e.getAttachment(x);a.attachDepth(o);const n=this.techniques.get(w,this._configuration);this._renderGaussianColorAndDepth(a,n),this._depthCompositionPassParameters.splatDepth=a.getTexture(R),r.bindFramebuffer(e.fbo);const h=this.techniques.get(b);r.bindTechnique(h,this.bindParameters,this._depthCompositionPassParameters),r.screen.draw(),this._colorCompositionPassParameters.splatColor=a.getTexture();const l=this.techniques.get(f);r.bindTechnique(l,this.bindParameters,this._colorCompositionPassParameters);const p=r.setDrawBuffers([D]);if(r.screen.draw(),i){this._emissionCompositionPassParameters.splatColor=a.getTexture();const e=this.techniques.get(S);r.bindTechnique(e,this.bindParameters,this._emissionCompositionPassParameters),r.setDrawBuffers([y,R]),r.screen.draw()}return r.setDrawBuffers(p),a.release(),e}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this.requestRender(1))}set clippingBox(e){const i=e||h;this._hasSameClipBox(i)||(n(this._clipBox,i),this._tileCullingRevision=u(this._tileCullingRevision,1),this._data.requestSort(),this.requestRender(1))}get clippingBox(){return this._clippingEnabled?this._clipBox:null}get tileCullingRevision(){return this._tileCullingRevision}get _clippingEnabled(){return!l(this._clipBox,h,(e,i)=>e===i)}get _isIdle(){return 2===this.view.state.mode}get _data(){return this.layerView.data}get _canRender(){return m(this._data)}get _fadeHelper(){return this.layerView.fadeHelper}_updateConfigurations(){this._configuration.alphaCutoff=this.view.qualitySettings.gaussianSplat.minimumOpacity,this._configuration.fadingEnabled=this._fadeHelper.fadingEnabled,this._configuration.receiveShadows=this.bindParameters.shadowMap.ready,this._configuration.preciseDepth=d(this.bindParameters),this._configuration.hasShadowHighlights=this._configuration.receiveShadows&&this.bindParameters.hasShadowHighlights,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this._slicePlaneEnabled&&null!=this.bindParameters.slicePlane}_onCameraChange(){this._tileCullingRevision=u(this._tileCullingRevision,1);const e=this.view.state.camera.ray.direction;this._cameraSortDirty=!0,(this._isIdle||this._shouldRequestSort(e))&&this._requestCameraSort(e)}_shouldRequestSort(e){return Math.abs(e[0]-this._previousSortRequestCameraDirection[0])>this._sortRequestDirectionEpsilon||Math.abs(e[1]-this._previousSortRequestCameraDirection[1])>this._sortRequestDirectionEpsilon||Math.abs(e[2]-this._previousSortRequestCameraDirection[2])>this._sortRequestDirectionEpsilon}_requestCameraSort(e){this._data.requestSort(),r(this._previousSortRequestCameraDirection,e),this._cameraSortDirty=!1}_prepareParameters(){_(this._passParameters,this.layerView,this.camera)}_hasSameClipBox(e){return l(this._clipBox,e,(e,i)=>e===i)}_renderGaussianColorAndDepth(e,i){const t=this.renderingContext;e.acquireColor(R,5,"gaussian depth output"),t.bindFramebuffer(e.fbo),t.setClearColor(0,0,0,0),t.clear(16384),this.renderingContext.bindTechnique(i,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(E.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}};e([t()],G.prototype,"consumes",void 0),e([t()],G.prototype,"produces",void 0),e([t({constructOnly:!0})],G.prototype,"layerView",void 0),G=e([s("esri.views.3d.webgl-engine.lib.GaussianSplatRenderer")],G);export{G as GaussianSplatRenderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as i,subclass as t}from"../../../../core/accessorSupport/decorators.js";import{invert as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{InternalRenderCategory as n}from"../../webgl.js";import o from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as i,subclass as t}from"../../../../core/accessorSupport/decorators.js";import{invert as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{InternalRenderCategory as n}from"../../webgl.js";import o from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as p,prepareGaussianSplatRenderParameters as h}from"./GaussianSplatRenderUtils.js";import{gaussianSplatDepthPolicy as l}from"../shaders/GaussianSplatDepthPolicy.js";import{G as d}from"../../../../chunks/GaussianSplatShadow.glsl.js";import{GaussianSplatShadowTechnique as c}from"../shaders/GaussianSplatShadowTechnique.js";import{GaussianSplatTechniqueConfiguration as u}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{PrimitiveType as m}from"../../../webgl/enums.js";let g=class extends o{constructor(e){super(e),this.consumes={required:[n.SHADOWMAP]},this.produces=n.SHADOWMAP,this.layerView=null,this._passParameters=new d,this._cameraPosition=r(),this._configuration=new u(e.view.state.isGlobal)}precompile(){this._canRender&&(this._updateConfiguration(),this.techniques.precompile(c,this._configuration))}render(){const e=this.bindRenderTarget();return this._canRender&&this._render(),e}queryDepthRange(e){return this.layerView.suspended?null:this._data.queryVisibleTileDepthRange(e,this.layerView.clippingBox)}get _data(){return this.layerView.data}get _clippingEnabled(){return null!=this.layerView.clippingBox}get _canRender(){return!this.layerView.suspended&&p(this._data)}_render(){this._updateConfiguration();const e=this.techniques.get(c,this._configuration);this._prepareShadowParameters(this.bindParameters.camera),this.renderingContext.bindTechnique(e,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(m.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}_updateConfiguration(){this._configuration.preciseDepth=!0,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this.layerView.slicePlaneEnabled&&null!=this.bindParameters.slicePlane,this._configuration.output=8===this.bindParameters.output?8:5}_prepareShadowParameters(e){s(this._passParameters.inverseProjectionMatrix,e.projectionMatrix);const i=this.bindParameters.renderingShadowAnalysisMap?l.accumulated:l.direct;this._passParameters.alphaCutoff=i.alphaCutoff,this._passParameters.depthBias=i.depthBias,this._updateShadowCameraPosition(e),h(this._passParameters,this.layerView,e,this._cameraPosition)}_updateShadowCameraPosition(e){const i=e.viewInverseTransposeMatrix;a(this._cameraPosition,i[3],i[7],i[11])}};e([i()],g.prototype,"consumes",void 0),e([i()],g.prototype,"produces",void 0),e([i({constructOnly:!0})],g.prototype,"layerView",void 0),g=e([t("esri.views.3d.webgl-engine.lib.GaussianSplatShadows")],g);export{g as GaussianSplatShadows};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GaussianSplatColorCompositionPassParameters,b as build}from"../../../../chunks/GaussianSplatColorComposition.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as o}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{S as i}from"../../../../chunks/GaussianSplatColorComposition.glsl.js";import{makePipelineState as t,defaultDepthWrite as a,defaultColorWrite as l,premultipliedAlpha as n}from"../../../webgl/renderState.js";let p=class extends s{constructor(){super(...arguments),this.shader=new r(i,()=>import("./GaussianSplatColorComposition.glsl.js"))}initializePipeline(){return t({blending:n,colorWrite:l,depthTest:null,depthWrite:a})}};p=e([o("esri.views.3d.webgl-engine.shaders.GaussianSplatColorCompositionTechnique")],p);export{p as GaussianSplatColorCompositionTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const a=.25,t=80*15259e-9,e={direct:{alphaCutoff:a,depthBias:t},accumulated:{alphaCutoff:.5,depthBias:4*t}
|
|
2
|
+
const a=.25,t=80*15259e-9,e={direct:{alphaCutoff:a,depthBias:t},accumulated:{alphaCutoff:.5,depthBias:4*t}};export{e as gaussianSplatDepthPolicy,a as gaussianSplatFirstHitAlpha};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/util/emissionFilter.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as
|
|
2
|
+
import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/util/emissionFilter.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GaussianSplatEmissionCompositionPassParameters,b as build}from"../../../../chunks/GaussianSplatEmissionComposition.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as s}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{S as r}from"../../../../chunks/GaussianSplatEmissionComposition.glsl.js";import{makePipelineState as t,defaultDepthWrite as n,defaultColorWrite as a,modulateDestinationPreserveAlpha as l}from"../../../webgl/renderState.js";let p=class extends o{constructor(){super(...arguments),this.shader=new i(r,()=>import("./GaussianSplatEmissionComposition.glsl.js"))}initializePipeline(){return t({blending:l,colorWrite:a,depthTest:null,depthWrite:n})}};p=e([s("esri.views.3d.webgl-engine.shaders.GaussianSplatEmissionCompositionTechnique")],p);export{p as GaussianSplatEmissionCompositionTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{G as o}from"../../../../chunks/GaussianSplat.glsl.js";import{makePipelineState as t,defaultColorWrite as a,
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{G as o}from"../../../../chunks/GaussianSplat.glsl.js";import{makePipelineState as t,defaultColorWrite as a,premultipliedAlphaFrontToBack as n}from"../../../webgl/renderState.js";let l=class extends i{constructor(){super(...arguments),this.shader=new s(o,()=>import("./GaussianSplat.glsl.js"))}initializePipeline(){return t({blending:n,depthTest:{func:515},colorWrite:a})}};l=e([r("esri.views.3d.webgl-engine.shaders.GaussianSplatTechnique")],l);export{l as GaussianSplatTechnique};
|
package/views/DOMContainer.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type DefaultUI from "./ui/DefaultUI.js";
|
|
2
|
+
import type { ScreenRect } from "../core/types.js";
|
|
2
3
|
import type { DefaultUIProperties } from "./ui/DefaultUI.js";
|
|
3
4
|
|
|
4
5
|
export interface DOMContainerProperties extends Partial<Pick<DOMContainer, "aria" | "attributionMode">> {
|
|
@@ -18,6 +19,15 @@ export interface DOMContainerProperties extends Partial<Pick<DOMContainer, "aria
|
|
|
18
19
|
* });
|
|
19
20
|
*/
|
|
20
21
|
container?: HTMLDivElement | string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates whether the focus region is currently enabled.
|
|
24
|
+
*
|
|
25
|
+
* Set this property to `true` to show the centered focus region, or `false` to hide it.
|
|
26
|
+
*
|
|
27
|
+
* @default false
|
|
28
|
+
* @since 5.2
|
|
29
|
+
*/
|
|
30
|
+
focusRegionEnabled?: boolean;
|
|
21
31
|
/**
|
|
22
32
|
* Exposes the default widgets available in the view and allows you to toggle them on
|
|
23
33
|
* and off. See [DefaultUI](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/) for more details.
|
|
@@ -105,6 +115,23 @@ export abstract class DOMContainer {
|
|
|
105
115
|
* @since 4.7
|
|
106
116
|
*/
|
|
107
117
|
get focused(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* The screen rectangle for the active focus region.
|
|
120
|
+
*
|
|
121
|
+
* The value is `null` when [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) is `false`.
|
|
122
|
+
*
|
|
123
|
+
* @since 5.2
|
|
124
|
+
*/
|
|
125
|
+
get focusRegion(): ScreenRect | null;
|
|
126
|
+
/**
|
|
127
|
+
* Indicates whether the focus region is currently enabled.
|
|
128
|
+
*
|
|
129
|
+
* Set this property to `true` to show the centered focus region, or `false` to hide it.
|
|
130
|
+
*
|
|
131
|
+
* @default false
|
|
132
|
+
* @since 5.2
|
|
133
|
+
*/
|
|
134
|
+
accessor focusRegionEnabled: boolean;
|
|
108
135
|
/**
|
|
109
136
|
* The height of the view in pixels read from the view container element.
|
|
110
137
|
*
|