@wcardinal/wcardinal-geditor
Version:
WebGL-based graphic editor, tester and viewer for supervisory systems
37 lines • 1.64 kB
JavaScript
import { __extends } from "tslib";
import { EShapeCapabilities, EShapeCapability, EShapePointsStyle } from "@wcardinal/wcardinal-ui";
import { ECommandShapeProperty } from "./e-command-shape-property";
var ECommandShapePropertyPointsStyle = /** @class */ (function (_super) {
__extends(ECommandShapePropertyPointsStyle, _super);
function ECommandShapePropertyPointsStyle(selection, added, removed) {
return _super.call(this, selection, [added, removed]) || this;
}
ECommandShapePropertyPointsStyle.prototype.toCapability = function (shape) {
if (EShapeCapabilities.contains(shape, EShapeCapability.LINE)) {
return EShapeCapability.LINE;
}
return EShapeCapability.NONE;
};
ECommandShapePropertyPointsStyle.prototype.getProperty = function (shape, capability) {
var points = shape.points;
if (points != null) {
return points.style;
}
return EShapePointsStyle.NONE;
};
ECommandShapePropertyPointsStyle.prototype.setProperty = function (shape, capability, property) {
var points = shape.points;
if (points != null) {
points.style = property;
}
};
ECommandShapePropertyPointsStyle.prototype.initProperty = function (shape, capability, property) {
var points = shape.points;
if (points != null) {
points.style = (points.style & ~property[1]) | property[0];
}
};
return ECommandShapePropertyPointsStyle;
}(ECommandShapeProperty));
export { ECommandShapePropertyPointsStyle };
//# sourceMappingURL=e-command-shape-property-points-style.js.map