UNPKG

@wcardinal/wcardinal-geditor

Version:

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

140 lines 4.75 kB
import { __extends } from "tslib"; import { DBaseStateSetImpl, DCommandBase } from "@wcardinal/wcardinal-ui"; var ECommandDocumentAll = /** @class */ (function (_super) { __extends(ECommandDocumentAll, _super); function ECommandDocumentAll(diagram, canvas, name, label, width, height, category, summary, description, backgroundColor, backgroundAlpha) { var _this = _super.call(this) || this; _this._diagram = diagram; _this._canvas = canvas; _this._name = name; _this._label = label; _this._width = width; _this._height = height; _this._category = category; _this._summary = summary; _this._description = description; _this._backgroundColor = backgroundColor; _this._backgroundAlpha = backgroundAlpha; return _this; } Object.defineProperty(ECommandDocumentAll.prototype, "diagram", { get: function () { return this._diagram; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "canvas", { get: function () { return this._canvas; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "name", { get: function () { return this._name; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "label", { get: function () { return this._label; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "width", { get: function () { return this._width; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "height", { get: function () { return this._height; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "category", { get: function () { return this._category; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "summary", { get: function () { return this._summary; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "description", { get: function () { return this._description; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "backgroundColor", { get: function () { return this._backgroundColor; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentAll.prototype, "backgroundAlpha", { get: function () { return this._backgroundAlpha; }, enumerable: false, configurable: true }); ECommandDocumentAll.prototype.execute = function () { return this.redo(); }; ECommandDocumentAll.prototype.redo = function () { var canvas = this._canvas; var name = this._name; this._name = canvas.name; canvas.name = name; var label = this._label; this._label = canvas.label; canvas.label = label; var width = this._width; this._width = canvas.width; canvas.width = width; var height = this._height; this._height = canvas.height; canvas.height = height; var category = this._category; this._category = canvas.category; canvas.category = category; var summary = this._summary; this._summary = canvas.summary; canvas.summary = summary; var description = this._description; this._description = canvas.description; canvas.description = description; var backgroundColor = this._backgroundColor; var backgroundAlpha = this._backgroundAlpha; var state = new DBaseStateSetImpl(); var background = canvas.background; this._backgroundColor = background.getColor(state); this._backgroundAlpha = background.getAlpha(state); background.color = backgroundColor; background.alpha = backgroundAlpha; this._diagram.emit("change", this._diagram); return true; }; ECommandDocumentAll.prototype.undo = function () { return this.redo(); }; return ECommandDocumentAll; }(DCommandBase)); export { ECommandDocumentAll }; //# sourceMappingURL=e-command-document-all.js.map