UNPKG

@wcardinal/wcardinal-geditor

Version:

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

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