UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 1.01 kB
import"../../../intl.js";import{substitute as e}from"../../../intl/substitute.js";function n(e,n){return n}function t(e){const n=this;e.appendChild(n)}function r(t,r,i){if(!r)return;if("string"==typeof r||"number"==typeof r)return r;if("value"in r||"unit"in r)return e(t.dotValue,r);if("colorName"in r&&"bandName"in r)return t[r.colorName]+": "+(t[r.bandName]||r.bandName);if("showCount"in r)return r.showCount?t.clusterCountTitle:null;let l=null;return n(r,i)?l=r.ratioPercentTotal?"showRatioPercentTotal":r.ratioPercent?"showRatioPercent":r.ratio?"showRatio":r.normField?"showNormField":r.field?"showField":null:o(r,i)&&(l=r.normField?"showNormField":r.normByPct?"showNormPct":r.field?"showField":null),l?e("showField"===l?"{field}":t[l],{field:r.field,normField:r.normField}):null}function o(e,n){return!n}function i(e,n){return!!(n&&"Stretched"===n&&e.version>=10.3&&"esri.layers.ImageryLayer"===e.declaredClass)}export{t as attachToNode,r as getTitle,i as isImageryStretchedLegend,o as isRendererTitle};