UNPKG

@wcardinal/wcardinal-geditor

Version:

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

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