UNPKG

@wcardinal/wcardinal-geditor

Version:

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

39 lines 1.42 kB
import { __extends } from "tslib"; import { DCommandBase } from "@wcardinal/wcardinal-ui"; var ECommandDocumentSnapBringForward = /** @class */ (function (_super) { __extends(ECommandDocumentSnapBringForward, _super); function ECommandDocumentSnapBringForward(snapper, index) { var _this = _super.call(this) || this; _this._snapper = snapper; _this._index = index; return _this; } Object.defineProperty(ECommandDocumentSnapBringForward.prototype, "snapper", { get: function () { return this._snapper; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentSnapBringForward.prototype, "index", { get: function () { return this._index; }, enumerable: false, configurable: true }); ECommandDocumentSnapBringForward.prototype.execute = function () { return this.redo(); }; ECommandDocumentSnapBringForward.prototype.redo = function () { var index = this._index; this._snapper.target.swap(index - 1, index); return true; }; ECommandDocumentSnapBringForward.prototype.undo = function () { return this.redo(); }; return ECommandDocumentSnapBringForward; }(DCommandBase)); export { ECommandDocumentSnapBringForward }; //# sourceMappingURL=e-command-document-snap-bring-forward.js.map