igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
104 lines (103 loc) • 3.44 kB
JavaScript
import { IgxSeriesLayerPropertyOverlayCollection } from "./igx-series-layer-property-overlay-collection";
import { SeriesLayer as SeriesLayer_internal } from "./SeriesLayer";
import { SeriesLayerPropertyOverlayCollection as SeriesLayerPropertyOverlayCollection_internal } from "./SeriesLayerPropertyOverlayCollection";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { SyncableObservableCollection$1 } from "igniteui-angular-core";
/**
* Represents an axis annotation
*/
export class IgxSeriesLayer {
constructor() {
this._propertyOverlays = null;
this._zoneRunner = null;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
createImplementation() {
return new SeriesLayer_internal();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
onImplementationCreated() {
}
_provideImplementation(i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
}
get transitionOutIsInProgress() {
return this.i.t;
}
/**
* Gets or sets the ZIndex to use for layering the series layers.
*/
get zIndex() {
return this.i.ac;
}
set zIndex(v) {
this.i.ac = +v;
}
/**
* Gets the current extra layers for the series.
*/
get propertyOverlays() {
if (this._propertyOverlays === null) {
let coll = new IgxSeriesLayerPropertyOverlayCollection();
let innerColl = this.i.m;
if (!innerColl) {
innerColl = new SeriesLayerPropertyOverlayCollection_internal();
}
this._propertyOverlays = coll._fromInner(innerColl);
}
return this._propertyOverlays;
}
set propertyOverlays(v) {
if (this._propertyOverlays !== null) {
this._propertyOverlays._setSyncTarget(null);
this._propertyOverlays = null;
}
let coll = new IgxSeriesLayerPropertyOverlayCollection();
this._propertyOverlays = coll._fromOuter(v);
let syncColl = new SyncableObservableCollection$1(SeriesLayerPropertyOverlay.$type);
let innerColl = this.i.m;
if (!innerColl) {
innerColl = new SeriesLayerPropertyOverlayCollection_internal();
}
syncColl._inner = innerColl;
syncColl.clear();
this._propertyOverlays._setSyncTarget(syncColl);
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.propertyOverlays != null && this.propertyOverlays.findByName && this.propertyOverlays.findByName(name)) {
return this.propertyOverlays.findByName(name);
}
return null;
}
playTransitionOutAndRemove() {
this.i.au();
}
playTransitionIn() {
this.i.at();
}
_runInZone(act) {
if (this._zoneRunner != null) {
this._zoneRunner(act);
}
else {
act();
}
}
}