UNPKG

igniteui-webcomponents-charts

Version:

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

52 lines (51 loc) 1.96 kB
import { __extends } from "tslib"; import { IgCollection } from "igniteui-webcomponents-core"; import { markType } from "igniteui-webcomponents-core"; import { SyncableObservableCollection$2 } from "igniteui-webcomponents-core"; import { IAxisAnnotation_$type } from './IAxisAnnotation'; import { IgcAxisAnnotation } from './igc-axis-annotation'; var IgcAxisAnnotationCollection = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcAxisAnnotationCollection, _super); function IgcAxisAnnotationCollection(list) { var _this = _super.call(this) || this; if (!IgcAxisAnnotation.$type) { IgcAxisAnnotation.$type = markType(IgcAxisAnnotation, "AxisAnnotation"); } if (list) { for (var i = 0; i < list.length; i++) { _this.add(list[i]); } } return _this; } IgcAxisAnnotationCollection.prototype._createInnerColl = function () { if (!IgcAxisAnnotation.$type) { IgcAxisAnnotation.$type = markType(IgcAxisAnnotation, "AxisAnnotation"); } var coll = new SyncableObservableCollection$2(IgcAxisAnnotation.$type, IAxisAnnotation_$type, 0); coll.compare = function (ext, int) { var comp = ext; if (comp._implementation) { comp = comp._implementation; } if (comp.equals) { return comp.equals(int); } return comp === int; }; coll.createTo = function (ext) { return ext._implementation; }; coll.createFrom = function (int) { var ext = int.externalObject; if (!ext) { ext = new IgcAxisAnnotation(); ext._implementation = int; } return ext; }; return coll; }; return IgcAxisAnnotationCollection; }(IgCollection)); export { IgcAxisAnnotationCollection };