任务
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<gl-map ref="glMap"/>
|
||||
<el-row type="flex" justify="end">
|
||||
<button class="button_control" @click="$router.push('/index/home')"><p>放弃建图</p></button>
|
||||
<button class="button_control" style="margin-left: 10px" :disabled="disabled" @click="_stopMapping"><p>结束建图</p></button>
|
||||
<button class="button_control" style="margin-left: 10px" :disabled="disabled" @click="stopMappingConfirm"><p>结束建图</p></button>
|
||||
</el-row>
|
||||
<el-dialog
|
||||
title="设置站点"
|
||||
@@ -230,6 +230,20 @@ export default {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
stopMappingConfirm () {
|
||||
this.$confirm('确定是否结束建图?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this._stopMapping()
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消结束建图'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 结束建图
|
||||
async _stopMapping () {
|
||||
this.disabled = true
|
||||
|
||||
@@ -183,20 +183,14 @@ export default {
|
||||
this.controls.enableZoom = true; // 启用缩放
|
||||
this.controls.enablePan = true; // 启用平移(拖动)
|
||||
this.controls.screenSpacePanning = true; // 2D平移模式
|
||||
this.controls.touchZoomSpeed = 0.5; // 降低触摸缩放速度
|
||||
this.controls.panSpeed = 0.5; // 降低平移速度
|
||||
this.controls.touchZoomSpeed = 0.5;
|
||||
this.controls.panSpeed = 0.5;
|
||||
|
||||
// 鼠标/触摸优化
|
||||
this.controls.mouseButtons = {
|
||||
LEFT: THREE.MOUSE.PAN, // 左键拖动
|
||||
MIDDLE: THREE.MOUSE.DOLLY // 中键缩放(可选)
|
||||
this.controls.touches = {
|
||||
ONE: THREE.TOUCH.PAN, // 单指拖动为平移
|
||||
TWO: THREE.TOUCH.DOLLY_PAN // 双指拖动为缩放和平移
|
||||
};
|
||||
|
||||
// 触摸支持
|
||||
this.controls.touchAction = 'none';
|
||||
this.controls.touchPan = true;
|
||||
this.controls.touchZoom = true;
|
||||
|
||||
// 添加错误处理逻辑
|
||||
this.controls.addEventListener('error', (event) => {
|
||||
console.error('OrbitControls error:', event);
|
||||
|
||||
Reference in New Issue
Block a user