UNPKG

@wcardinal/wcardinal-geditor

Version:

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

41 lines 1.43 kB
import { __extends } from "tslib"; import { DCommandBase } from "@wcardinal/wcardinal-ui"; var ECommandDocumentSnapGridSize = /** @class */ (function (_super) { __extends(ECommandDocumentSnapGridSize, _super); function ECommandDocumentSnapGridSize(snapper, size) { var _this = _super.call(this) || this; _this._snapper = snapper; _this._size = size; return _this; } Object.defineProperty(ECommandDocumentSnapGridSize.prototype, "snapper", { get: function () { return this._snapper; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentSnapGridSize.prototype, "size", { get: function () { return this._size; }, enumerable: false, configurable: true }); ECommandDocumentSnapGridSize.prototype.execute = function () { return this.redo(); }; ECommandDocumentSnapGridSize.prototype.redo = function () { var snapper = this._snapper; var size = this._size; this._size = snapper.grid.size; snapper.grid.size = size; return true; }; ECommandDocumentSnapGridSize.prototype.undo = function () { return this.redo(); }; return ECommandDocumentSnapGridSize; }(DCommandBase)); export { ECommandDocumentSnapGridSize }; //# sourceMappingURL=e-command-document-snap-grid-size.js.map