@wcardinal/wcardinal-geditor
Version:
WebGL-based graphic editor, tester and viewer for supervisory systems
30 lines • 1.28 kB
JavaScript
import { __extends } from "tslib";
import { EShapeCapability } from "@wcardinal/wcardinal-ui";
import { ECommandShapeProperty } from "./e-command-shape-property";
var ECommandShapePropertyCapability = /** @class */ (function (_super) {
__extends(ECommandShapePropertyCapability, _super);
function ECommandShapePropertyCapability() {
return _super !== null && _super.apply(this, arguments) || this;
}
ECommandShapePropertyCapability.prototype.getProperty = function (shape, capability) {
var shapeCapability = shape.getCapability();
if (shapeCapability != null) {
return shapeCapability.locked;
}
return EShapeCapability.NONE;
};
ECommandShapePropertyCapability.prototype.setProperty = function (shape, capability, property) {
if (property !== EShapeCapability.NONE) {
shape.capability.locked = property;
}
else {
var shapeCapability = shape.getCapability();
if (shapeCapability != null) {
shapeCapability.locked = property;
}
}
};
return ECommandShapePropertyCapability;
}(ECommandShapeProperty));
export { ECommandShapePropertyCapability };
//# sourceMappingURL=e-command-shape-property-capability.js.map