UNPKG

@wcardinal/wcardinal-geditor

Version:

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

50 lines 1.64 kB
import { __extends } from "tslib"; import { DCommandBase } from "@wcardinal/wcardinal-ui"; var ECommandDocumentLabel = /** @class */ (function (_super) { __extends(ECommandDocumentLabel, _super); function ECommandDocumentLabel(diagram, canvas, label) { var _this = _super.call(this) || this; _this._diagram = diagram; _this._canvas = canvas; _this._label = label; return _this; } Object.defineProperty(ECommandDocumentLabel.prototype, "diagram", { get: function () { return this._diagram; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentLabel.prototype, "canvas", { get: function () { return this._canvas; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentLabel.prototype, "label", { get: function () { return this._label; }, enumerable: false, configurable: true }); ECommandDocumentLabel.prototype.execute = function () { return this.redo(); }; ECommandDocumentLabel.prototype.redo = function () { var canvas = this._canvas; var label = this._label; this._label = canvas.label; canvas.label = label; this._diagram.emit("change", this._diagram); return true; }; ECommandDocumentLabel.prototype.undo = function () { return this.redo(); }; return ECommandDocumentLabel; }(DCommandBase)); export { ECommandDocumentLabel }; //# sourceMappingURL=e-command-document-label.js.map