@wcardinal/wcardinal-geditor
Version:
WebGL-based graphic editor, tester and viewer for supervisory systems
27 lines • 1.21 kB
JavaScript
import { __extends } from "tslib";
import { EShapeCapabilities, EShapeCapability } from "@wcardinal/wcardinal-ui";
import { ECommandShapePropertySimple } from "./e-command-shape-property-simple";
var ECommandShapePropertySizeX = /** @class */ (function (_super) {
__extends(ECommandShapePropertySizeX, _super);
function ECommandShapePropertySizeX() {
return _super !== null && _super.apply(this, arguments) || this;
}
ECommandShapePropertySizeX.prototype.toCapability = function (shape) {
if (EShapeCapabilities.contains(shape, EShapeCapability.WIDTH)) {
return EShapeCapability.WIDTH;
}
return EShapeCapability.NONE;
};
ECommandShapePropertySizeX.prototype.getProperty = function (shape, capability) {
return shape.size.x;
};
ECommandShapePropertySizeX.prototype.setProperty = function (shape, capability, property) {
shape.size.x = property;
};
ECommandShapePropertySizeX.prototype.isMergeable = function () {
return true;
};
return ECommandShapePropertySizeX;
}(ECommandShapePropertySimple));
export { ECommandShapePropertySizeX };
//# sourceMappingURL=e-command-shape-property-size-x.js.map