UNPKG

@wcardinal/wcardinal-geditor

Version:

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

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