文本框不受卷帘影响

This commit is contained in:
zh
2025-08-26 18:46:32 +08:00
parent a69034a18e
commit d1dd920fd2

View File

@ -146,10 +146,8 @@ async function init(sdk) {
rightElm.style.position = 'absolute'
rightElm.style.right = 'calc(50% - 50px)'
if (!activeIds || activeIds.length == 0) {
leftElm.style.display = 'none'
rightElm.style.display = 'none'
}
leftElm.style.display = 'none'
rightElm.style.display = 'none'
sdk.viewer._element.appendChild(leftElm)
sdk.viewer._element.appendChild(rightElm)
@ -158,6 +156,12 @@ async function init(sdk) {
let right = 0
if (activeIds) {
for (let i = 0; i < activeIds.length; i++) {
let thatP = sdk.entityMap.get(activeIds[i])
if (!thatP || (thatP.type === 'terrain' || !thatP.show) || thatP.type === 'TextBox') {
continue
}
leftElm.style.display = 'unset'
rightElm.style.display = 'unset'
let status = statusMap.get(activeIds[i])
if (status) {
if (status.P) {
@ -1290,6 +1294,8 @@ function setActiveId(ids = []) {
}
else {
if (leftElm && rightElm) {
leftElm.style.display = 'none'
rightElm.style.display = 'none'
let left = 0
let right = 0
for (let i = 0; i < activeIds.length; i++) {
@ -1309,8 +1315,6 @@ function setActiveId(ids = []) {
let thatP = sdkP.entityMap.get(activeIds[i])
// let thatD = sdkD.entityMap.get(activeIds[i])
if (!thatP || (thatP.type === 'terrain' || !thatP.show) || thatP.type === 'TextBox') {
leftElm.style.display = 'none'
rightElm.style.display = 'none'
continue
}
leftElm.style.display = 'unset'