@wcardinal/wcardinal-geditor
Version:
WebGL-based graphic editor, tester and viewer for supervisory systems
54 lines • 1.74 kB
JavaScript
import { __extends } from "tslib";
import { DCommandBase } from "@wcardinal/wcardinal-ui";
var ECommandShapeSelect = /** @class */ (function (_super) {
__extends(ECommandShapeSelect, _super);
function ECommandShapeSelect(before, after, selection) {
var _this = _super.call(this) || this;
_this._before = before;
_this._after = after;
_this._selection = selection;
return _this;
}
Object.defineProperty(ECommandShapeSelect.prototype, "before", {
get: function () {
return this._before;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ECommandShapeSelect.prototype, "after", {
get: function () {
return this._after;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ECommandShapeSelect.prototype, "selection", {
get: function () {
return this._selection;
},
enumerable: false,
configurable: true
});
ECommandShapeSelect.prototype.isClean = function () {
return true;
};
ECommandShapeSelect.prototype.execute = function () {
return true;
};
ECommandShapeSelect.prototype.redo = function () {
this._selection.restore(this._after);
return true;
};
ECommandShapeSelect.prototype.undo = function () {
this._selection.restore(this._before);
return true;
};
ECommandShapeSelect.prototype.destroy = function () {
this._before.length = 0;
this._after.length = 0;
};
return ECommandShapeSelect;
}(DCommandBase));
export { ECommandShapeSelect };
//# sourceMappingURL=e-command-shape-select.js.map