UNPKG

@wcardinal/wcardinal-geditor

Version:

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

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