igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
52 lines (51 loc) • 1.99 kB
JavaScript
import { __extends } from "tslib";
import { IgCollection } from "igniteui-angular-core";
import { markType } from "igniteui-angular-core";
import { SyncableObservableCollection$2 } from "igniteui-angular-core";
import { IAxisAnnotation_$type } from './IAxisAnnotation';
import { IgxAxisAnnotation } from './igx-axis-annotation';
var IgxAxisAnnotationCollection = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgxAxisAnnotationCollection, _super);
function IgxAxisAnnotationCollection(list) {
var _this = _super.call(this) || this;
if (!IgxAxisAnnotation.$type) {
IgxAxisAnnotation.$type = markType(IgxAxisAnnotation, "AxisAnnotation");
}
if (list) {
for (var i = 0; i < list.length; i++) {
_this.add(list[i]);
}
}
return _this;
}
IgxAxisAnnotationCollection.prototype._createInnerColl = function () {
if (!IgxAxisAnnotation.$type) {
IgxAxisAnnotation.$type = markType(IgxAxisAnnotation, "AxisAnnotation");
}
var coll = new SyncableObservableCollection$2(IgxAxisAnnotation.$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 IgxAxisAnnotation();
ext._implementation = int;
}
return ext;
};
return coll;
};
return IgxAxisAnnotationCollection;
}(IgCollection));
export { IgxAxisAnnotationCollection };