UNPKG

igniteui-webcomponents-charts

Version:

Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.

54 lines (53 loc) 1.88 kB
import { IgCollection } from "igniteui-webcomponents-core"; import { markType } from "igniteui-webcomponents-core"; import { SyncableObservableCollection$2 } from "igniteui-webcomponents-core"; import { SeriesLayer as SeriesLayer_internal } from './SeriesLayer'; import { IgcSeriesLayer as IgcSeriesLayer } from './igc-series-layer'; export class IgcSeriesLayerCollection extends IgCollection { constructor(list) { super(); if (!IgcSeriesLayer.$type) { IgcSeriesLayer.$type = markType(IgcSeriesLayer, "IgcSeriesLayer"); } if (list) { for (let i = 0; i < list.length; i++) { this.add(list[i]); } } } _createInnerColl() { if (!IgcSeriesLayer.$type) { IgcSeriesLayer.$type = markType(IgcSeriesLayer, "IgcSeriesLayer"); } let coll = new SyncableObservableCollection$2(IgcSeriesLayer.$type, SeriesLayer_internal.$type, 0); coll.compare = (ext, int) => { let comp = ext; if (comp._implementation) { comp = comp._implementation; } if (comp.equals) { return comp.equals(int); } return comp === int; }; coll.createTo = (ext) => { return ext._implementation; }; coll.createFrom = (int) => { let ext = int.externalObject; if (!ext) { ext = new IgcSeriesLayer(); if (ext) { if (!int.$type && ext._implementation.setNativeElement) { ext._implementation.setNativeElement(int); } else { ext._implementation = int; } } } return ext; }; return coll; } }