|
@@ -151,9 +151,11 @@ var Alignment = {
|
|
|
}
|
|
|
})
|
|
|
this.history.addEventListener('undo',()=>{
|
|
|
- this.updateFakeMarker()
|
|
|
+ this.updateCtlDisplay()
|
|
|
+ })
|
|
|
+ this.history.addEventListener('redo',()=>{
|
|
|
+ this.updateCtlDisplay()
|
|
|
})
|
|
|
-
|
|
|
|
|
|
}
|
|
|
|
|
@@ -497,25 +499,22 @@ var Alignment = {
|
|
|
if(!this.editing)return
|
|
|
let selected = this.handleState == 'rotate' && this.selectedClouds.length > 0
|
|
|
if(selected){
|
|
|
- this.updateFakeMarker()
|
|
|
+ this.transformControls.attach(this.fakeMarkerForTran)
|
|
|
+ let position = this.selectedClouds[0].translateUser
|
|
|
+ let quaternion = this.getDatasetQuaternion(this.selectedClouds[0])
|
|
|
+ this.fakeMarkerForTran.position.copy(position)
|
|
|
+ this.fakeMarkerForTran.quaternion.copy(quaternion)
|
|
|
+ this.fakeMarkerForTran.oldState = {
|
|
|
+ position: position.clone(),
|
|
|
+ quaternion: quaternion.clone()
|
|
|
+ }
|
|
|
}else{
|
|
|
this.transformControls.detach()
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- updateFakeMarker(){
|
|
|
- this.transformControls.attach(this.fakeMarkerForTran)
|
|
|
-
|
|
|
- let position = this.selectedClouds[0].translateUser
|
|
|
- let quaternion = this.getDatasetQuaternion(this.selectedClouds[0])
|
|
|
- this.fakeMarkerForTran.position.copy(position)
|
|
|
- this.fakeMarkerForTran.quaternion.copy(quaternion)
|
|
|
- this.fakeMarkerForTran.oldState = {
|
|
|
- position: position.clone(),
|
|
|
- quaternion: quaternion.clone()
|
|
|
- }
|
|
|
- }
|
|
|
- ,
|
|
|
+
|
|
|
+
|
|
|
save: function(){//保存所有数据集的位置和旋转
|
|
|
let callback = ()=>{//保存成功后
|
|
|
this.originData = this.getTemp() //this.saveTemp();
|