igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
116 lines (115 loc) • 3.86 kB
JavaScript
import { ShapefileRecord as ShapefileRecord_internal } from "./ShapefileRecord";
import { fromRect, toRect } from './componentUtil';
/**
* Represents a record of data from a Shapefile (.shp and .dbf).
*/
var IgxShapefileRecord = /** @class */ /*@__PURE__*/ (function () {
function IgxShapefileRecord() {
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
}
IgxShapefileRecord.prototype.createImplementation = function () {
return new ShapefileRecord_internal();
};
Object.defineProperty(IgxShapefileRecord.prototype, "i", {
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgxShapefileRecord.prototype.onImplementationCreated = function () {
};
IgxShapefileRecord.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
};
Object.defineProperty(IgxShapefileRecord.prototype, "shapeType", {
/**
* Gets the shape type, as read from the header of the Shapefile.
*/
get: function () {
return this.i.shapeType;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxShapefileRecord.prototype, "fieldsNames", {
/**
* Gets an array of field names and values for this record
*/
get: function () {
return this.i.fieldsNames._inner;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxShapefileRecord.prototype, "fieldsTypes", {
/**
* Gets an arry of field types and values for this record
*/
get: function () {
return this.i.fieldsTypes._inner;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxShapefileRecord.prototype, "points", {
/**
* Gets an array of arrays of points for this record
*/
get: function () {
var ret = [];
var list = this.i.points;
for (var i = 0; i < list.count; i++) {
var innerlist = list.item(i);
ret.push(list.item(i)._inner);
}
return ret;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxShapefileRecord.prototype, "fieldValues", {
get: function () {
return this.i.fieldValues;
},
set: function (v) {
this.i.fieldValues = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxShapefileRecord.prototype, "bounds", {
/**
* Gets the bounds for the shapes
*/
get: function () {
return fromRect(this.i.bounds);
},
set: function (v) {
this.i.bounds = toRect(v);
},
enumerable: false,
configurable: true
});
IgxShapefileRecord.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
IgxShapefileRecord.prototype.getFieldValue = function (fieldName) {
var iv = this.i.getFieldValue(fieldName);
return (iv);
};
IgxShapefileRecord.prototype.setFieldValue = function (fieldName, value) {
this.i.setFieldValue(fieldName, value);
};
return IgxShapefileRecord;
}());
export { IgxShapefileRecord };