UNPKG

@wcardinal/wcardinal-geditor

Version:

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

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