UNPKG

@wcardinal/wcardinal-geditor

Version:

WebGL-based graphic editor, tester and viewer for supervisory systems

29 lines 1.42 kB
import { __extends } from "tslib"; import { EShapeCapabilities, EShapeCapability, EShapeConnectorLine } from "@wcardinal/wcardinal-ui"; import { ECommandShapePropertyRecursiveSimple } from "./e-command-shape-property-recursive-simple"; var ECommandShapePropertyLineHeadMargin = /** @class */ (function (_super) { __extends(ECommandShapePropertyLineHeadMargin, _super); function ECommandShapePropertyLineHeadMargin() { return _super !== null && _super.apply(this, arguments) || this; } ECommandShapePropertyLineHeadMargin.prototype.toCapability = function (shape) { if (EShapeCapabilities.contains(shape, EShapeCapability.LINE_HEAD)) { return EShapeCapability.LINE_HEAD; } return EShapeCapability.NONE; }; ECommandShapePropertyLineHeadMargin.prototype.getProperty = function (shape, capability) { if (shape instanceof EShapeConnectorLine) { return shape.edge.head.margin; } return 0; }; ECommandShapePropertyLineHeadMargin.prototype.setProperty = function (shape, capability, property) { if (shape instanceof EShapeConnectorLine) { shape.edge.head.margin = property; } }; return ECommandShapePropertyLineHeadMargin; }(ECommandShapePropertyRecursiveSimple)); export { ECommandShapePropertyLineHeadMargin }; //# sourceMappingURL=e-command-shape-property-line-head-margin.js.map