UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.26 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{readOffsetDistance as t,readVertexBeforeOffset as r,readByNumber as e,readCount as i,readDistance as o,getHeightUnitCorrectionFactor as s,makeFeatureFromGroupPart as l}from"./support/builderUtils.js";import{offset as n}from"./support/offsetUtils.js";import{computedTotalLength as p,pointAlongLineWithZAndOffset as f,pointAlongLineAndOffset as u,pointAlongLineWithZ as a,pointAlongLine as m}from"./support/shapeUtils.js";import{isPolyline as h,maxDigitizingDisplayEdits as d}from"../support/executorUtils.js";function c({templatePart:c,shape:g,edits:j,relationships:U,mode:b}){if(!h(g))return;const x=g,{builderConfig:P}=c,S=t(P),Z=r(P),k=e(P);let z=k?i(P):0,C=k?0:o(P,!1);const E=s(x),M=Z||0===S?x:n(x,S);if(null===M||!h(M))return;const $=p(M);if(k){if(z<=1)return;if(C=$/(z+1),C<=0)return}else{if(C<0)return;if(z=Math.floor($/C),0===z)return}let q=C,v=0;for(;v<z;){let t=null;if(t=Z?M.hasZ?f(M,q,S,E):u(M,q,S):M.hasZ?a(M,q,E):m(M,q),t&&l({templatePart:c,shape:t,edits:j,relationships:U,mode:b},`ES${v.toString()}`),"digitizing"===b&&j.length>d)break;q+=C,v++}}const g=!1;export{c as execute,g as isAsync};