12345678910111213141516171819202122232425 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.SGraphAddCommand = void 0;
- const SGraphCommand_1 = require("./SGraphCommand");
- class SGraphAddCommand extends SGraphCommand_1.SGraphCommand {
- constructor(scene, item) {
- super(scene);
- this.item = item;
- this.parent = item.parent;
- this.command = "SGraphAddCommand";
- this.desc = `添加对象=${item.id}`;
- }
- mergeWith(command) {
- return false;
- }
- redo() {
- this.item.parent = this.parent;
- this.parent.update();
- }
- undo() {
- this.item.parent = null;
- this.parent.update();
- }
- }
- exports.SGraphAddCommand = SGraphAddCommand;
|