Commit a414b851 authored by 李苏's avatar 李苏 💬

调整模型选中的逻辑,解决选中流向模型的问题

parent 03a44bde
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: lisu lisu@gavelinfo.com * @Author: lisu lisu@gavelinfo.com
* @LastEditors: lisu lisu@gavelinfo.com * @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-09-27 15:58:18 * @LastEditTime: 2024-10-08 14:58:28
* @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue * @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
--> -->
<template> <template>
...@@ -1489,11 +1489,19 @@ ...@@ -1489,11 +1489,19 @@
} }
let model let model
/* 测试判定,实际根据模型实际特征来判定*/ /* 测试判定,实际根据模型实际特征来判定*/
if (intersects[0].object.name == '') { // if (intersects[0].object.name == '') {
model = intersects[1].object // model = intersects[1].object
} else { // } else {
model = intersects[0].object // model = intersects[0].object
// }
let modelIndex = intersects.findIndex(item=>item.object.name!=='')
if(modelIndex!=-1){
model=intersects[modelIndex].object
}else{
console.log('本次选中不存在name的节点')
} }
/* 当模型隐藏 不继续触发*/ /* 当模型隐藏 不继续触发*/
if (model.visible == false) { if (model.visible == false) {
rconsole.log('当前对象已屏蔽') rconsole.log('当前对象已屏蔽')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment