calloutUtils.js 849 B

12345
  1. /*
  2. All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. See https://js.arcgis.com/4.25/esri/copyright.txt for details.
  4. */
  5. import{isSome as t}from"../../core/maybe.js";import e from"./Callout3D.js";import r from"./LineCallout3D.js";function n(e){if(!e)return!1;const r=e.verticalOffset;return!!r&&!(r.screenLength<=0||t(r.maxWorldLength)&&r.maxWorldLength<=0)}function o(t){if(!t)return!1;if(!t.supportsCallout||!t.supportsCallout())return!1;const e=t.callout;return!!e&&(!!e.visible&&!!n(t))}function i(t){return"point-3d"===t.type||"label-3d"===t.type}function l(t){return"center"===t.horizontalAlignment}const u={types:{key:"type",base:e,typeMap:{line:r}},json:{write:!0}};export{u as calloutProperty,i as hasCalloutSupport,o as hasVisibleCallout,n as hasVisibleVerticalOffset,l as textSymbolLayerSupportsVerticalOffset};