UNPKG

igniteui-react-core

Version:
113 lines (112 loc) 4.03 kB
import { delegateCombine, delegateRemove } from './type'; import { ItfConverter as ItfConverter_internal } from "./ItfConverter"; import { IgrAsyncCompletedEventArgs } from './igr-async-completed-event-args'; import { Uri } from './Uri'; /** * Class for converting Itf files into enumerable triangulations. */ var IgrTriangulationDataSource = /** @class */ /*@__PURE__*/ (function () { function IgrTriangulationDataSource() { //@@ZoneRunner this._importCompleted = null; this._importCompleted_wrapped = null; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); } IgrTriangulationDataSource.prototype.createImplementation = function () { return new ItfConverter_internal(); }; Object.defineProperty(IgrTriangulationDataSource.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrTriangulationDataSource.prototype.onImplementationCreated = function () { }; IgrTriangulationDataSource.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); }; Object.defineProperty(IgrTriangulationDataSource.prototype, "source", { /** * Gets the string path specifying the location of the Itf file. */ get: function () { if (this.i.source == null) return null; return this.i.source.value; }, /** * Sets the string path specifying the location of the Itf file. */ set: function (v) { if (v == null) { this.i.source = null; } else { this.i.source = new Uri(0, v); } }, enumerable: false, configurable: true }); /** * Gets the point data. */ IgrTriangulationDataSource.prototype.getPointData = function () { var iv = this.i.getPointData(); return iv._inner; }; /** * Gets the triangle data. */ IgrTriangulationDataSource.prototype.getTriangleData = function () { var iv = this.i.getTriangleData(); return iv._inner; }; IgrTriangulationDataSource.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; Object.defineProperty(IgrTriangulationDataSource.prototype, "importCompleted", { /** * Event raised when the import operation has completed */ get: function () { return this._importCompleted; }, set: function (ev) { var _this = this; if (this._importCompleted_wrapped !== null) { this.i.importCompleted = delegateRemove(this.i.importCompleted, this._importCompleted_wrapped); this._importCompleted_wrapped = null; this._importCompleted = null; } this._importCompleted = ev; this._importCompleted_wrapped = function (o, e) { var outerArgs = new IgrAsyncCompletedEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeImportCompleted) { _this.beforeImportCompleted(_this, outerArgs); } if (_this._importCompleted) { _this._importCompleted(_this, outerArgs); } }; this.i.importCompleted = delegateCombine(this.i.importCompleted, this._importCompleted_wrapped); ; }, enumerable: false, configurable: true }); return IgrTriangulationDataSource; }()); export { IgrTriangulationDataSource };