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 ECommandDocumentSnapSendBackward = /** @class */ (function (_super) { __extends(ECommandDocumentSnapSendBackward, _super); function ECommandDocumentSnapSendBackward(snapper, index) { var _this = _super.call(this) || this; _this._snapper = snapper; _this._index = index; return _this; } Object.defineProperty(ECommandDocumentSnapSendBackward.prototype, "snapper", { get: function () { return this._snapper; }, enumerable: false, configurable: true }); Object.defineProperty(ECommandDocumentSnapSendBackward.prototype, "index", { get: function () { return this._index; }, enumerable: false, configurable: true }); ECommandDocumentSnapSendBackward.prototype.execute = function () { return this.redo(); }; ECommandDocumentSnapSendBackward.prototype.redo = function () { var index = this._index; this._snapper.target.swap(index, index + 1); return true; }; ECommandDocumentSnapSendBackward.prototype.undo = function () { return this.redo(); }; return ECommandDocumentSnapSendBackward; }(DCommandBase)); export { ECommandDocumentSnapSendBackward }; //# sourceMappingURL=e-command-document-snap-send-backward.js.map