@wcardinal/wcardinal-geditor
Version:
WebGL-based graphic editor, tester and viewer for supervisory systems
31 lines • 1.24 kB
JavaScript
import { EShapeChartAxisX } from "./e-shape-chart-axis-x";
import { EShapeChartAxisY } from "./e-shape-chart-axis-y";
var EShapeChartAxis = /** @class */ (function () {
function EShapeChartAxis() {
this.x = new EShapeChartAxisX();
this.y = new EShapeChartAxisY();
}
EShapeChartAxis.prototype.copy = function (source) {
this.x.copy(source.x);
this.y.copy(source.y);
return this;
};
EShapeChartAxis.prototype.serialize = function (manager) {
return manager.addResource("[".concat(this.x.serialize(manager), ",").concat(this.y.serialize(manager), "]"));
};
EShapeChartAxis.prototype.deserialize = function (target, manager) {
var resources = manager.resources;
if (0 <= target && target < resources.length) {
var parsed = manager.getExtension(target);
if (parsed == null) {
parsed = JSON.parse(resources[target]);
manager.setExtension(target, parsed);
}
this.x.deserialize(parsed[0], manager);
this.y.deserialize(parsed[1], manager);
}
};
return EShapeChartAxis;
}());
export { EShapeChartAxis };
//# sourceMappingURL=e-shape-chart-axis.js.map