UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 1.17 kB
import{_ as r}from"../../../../chunks/tslib.es6.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{Deconflictor as e,State as o}from"./Deconflictor.js";import{VisibilityGroup as i}from"./enums.js";import{RenderState as a}from"../../../support/RenderState.js";import{Task as c}from"../../../support/Scheduler.js";const n=2e3;let p=class extends e{constructor(r){super(r),this.visibilityGroup=i.LABEL,this.iconMarginFactor=0,this._lastDeconfliction=0}get viewState(){return this.parent.viewState}runTask(r){if(this.parent.running)return c.YIELD;const t=performance.now();if(r.state!==a.IDLE&&t-this._lastDeconfliction<n)return c.YIELD;super.runTask(r),this.state===o.Idle&&(this._lastDeconfliction=t)}enabledChanged(r,t){this.modifyGraphics(t,r.labelsEnabled)}getGraphicsLayers(r){return r.labelLayers}};r([t({constructOnly:!0})],p.prototype,"parent",void 0),p=r([s("esri.views.3d.layers.graphics.LabelDeconflictor")],p);export{p as LabelDeconflictor};