|
@@ -675,17 +675,27 @@ export class SelectCtrl extends ModuleControl<EditorModule> {
|
|
let initrad = scope.objinitAngleRad;
|
|
let initrad = scope.objinitAngleRad;
|
|
|
|
|
|
const history = this.controls.historyCtrl.history;
|
|
const history = this.controls.historyCtrl.history;
|
|
|
|
+ this.objContainer?.setPivot(0);
|
|
|
|
+
|
|
history.record({
|
|
history.record({
|
|
undo: () => {
|
|
undo: () => {
|
|
- console.log("undo ");
|
|
|
|
|
|
+
|
|
|
|
+ const objContainer = this.objContainer as ObjsContainer;
|
|
|
|
+
|
|
this.objContainer?.setPivot(4);
|
|
this.objContainer?.setPivot(4);
|
|
this.objContainer?.rotate(initrad);
|
|
this.objContainer?.rotate(initrad);
|
|
|
|
+ this.objContainer?.setPivot(0);
|
|
|
|
+ this.objContainer?.updateCompState();
|
|
this.upgateGizmoStyle();
|
|
this.upgateGizmoStyle();
|
|
},
|
|
},
|
|
|
|
+
|
|
redo: () => {
|
|
redo: () => {
|
|
console.log("redo ");
|
|
console.log("redo ");
|
|
|
|
+ const objContainer = this.objContainer as ObjsContainer;
|
|
this.objContainer?.setPivot(4);
|
|
this.objContainer?.setPivot(4);
|
|
this.objContainer?.rotate(last);
|
|
this.objContainer?.rotate(last);
|
|
|
|
+ this.objContainer?.setPivot(0);
|
|
|
|
+ this.objContainer?.updateCompState();
|
|
this.upgateGizmoStyle();
|
|
this.upgateGizmoStyle();
|
|
},
|
|
},
|
|
} as any);
|
|
} as any);
|
|
@@ -802,6 +812,7 @@ export class SelectCtrl extends ModuleControl<EditorModule> {
|
|
let lastScale = { x: this.lastScale.x, y: this.lastScale.y };
|
|
let lastScale = { x: this.lastScale.x, y: this.lastScale.y };
|
|
|
|
|
|
const history = this.controls.historyCtrl.history;
|
|
const history = this.controls.historyCtrl.history;
|
|
|
|
+ this.objContainer?.setPivot(0);
|
|
|
|
|
|
history.record({
|
|
history.record({
|
|
undo: () => {
|
|
undo: () => {
|
|
@@ -809,12 +820,17 @@ export class SelectCtrl extends ModuleControl<EditorModule> {
|
|
|
|
|
|
this.objContainer?.setPivot(scaleIndex);
|
|
this.objContainer?.setPivot(scaleIndex);
|
|
this.objContainer?.scaleSize(preScale.x, preScale.y);
|
|
this.objContainer?.scaleSize(preScale.x, preScale.y);
|
|
|
|
+ this.objContainer?.setPivot(0);
|
|
|
|
+ this.objContainer?.updateCompState();
|
|
|
|
+
|
|
this.upgateGizmoStyle();
|
|
this.upgateGizmoStyle();
|
|
},
|
|
},
|
|
redo: () => {
|
|
redo: () => {
|
|
console.log("redo ");
|
|
console.log("redo ");
|
|
this.objContainer?.setPivot(scaleIndex);
|
|
this.objContainer?.setPivot(scaleIndex);
|
|
this.objContainer?.scaleSize(lastScale.x, lastScale.y);
|
|
this.objContainer?.scaleSize(lastScale.x, lastScale.y);
|
|
|
|
+ this.objContainer?.setPivot(0);
|
|
|
|
+ this.objContainer?.updateCompState();
|
|
this.upgateGizmoStyle();
|
|
this.upgateGizmoStyle();
|
|
},
|
|
},
|
|
} as any);
|
|
} as any);
|