文本框不受卷帘影响
This commit is contained in:
@ -146,10 +146,8 @@ async function init(sdk) {
|
|||||||
rightElm.style.position = 'absolute'
|
rightElm.style.position = 'absolute'
|
||||||
rightElm.style.right = 'calc(50% - 50px)'
|
rightElm.style.right = 'calc(50% - 50px)'
|
||||||
|
|
||||||
if (!activeIds || activeIds.length == 0) {
|
leftElm.style.display = 'none'
|
||||||
leftElm.style.display = 'none'
|
rightElm.style.display = 'none'
|
||||||
rightElm.style.display = 'none'
|
|
||||||
}
|
|
||||||
|
|
||||||
sdk.viewer._element.appendChild(leftElm)
|
sdk.viewer._element.appendChild(leftElm)
|
||||||
sdk.viewer._element.appendChild(rightElm)
|
sdk.viewer._element.appendChild(rightElm)
|
||||||
@ -158,6 +156,12 @@ async function init(sdk) {
|
|||||||
let right = 0
|
let right = 0
|
||||||
if (activeIds) {
|
if (activeIds) {
|
||||||
for (let i = 0; i < activeIds.length; i++) {
|
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])
|
let status = statusMap.get(activeIds[i])
|
||||||
if (status) {
|
if (status) {
|
||||||
if (status.P) {
|
if (status.P) {
|
||||||
@ -1290,6 +1294,8 @@ function setActiveId(ids = []) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (leftElm && rightElm) {
|
if (leftElm && rightElm) {
|
||||||
|
leftElm.style.display = 'none'
|
||||||
|
rightElm.style.display = 'none'
|
||||||
let left = 0
|
let left = 0
|
||||||
let right = 0
|
let right = 0
|
||||||
for (let i = 0; i < activeIds.length; i++) {
|
for (let i = 0; i < activeIds.length; i++) {
|
||||||
@ -1309,8 +1315,6 @@ function setActiveId(ids = []) {
|
|||||||
let thatP = sdkP.entityMap.get(activeIds[i])
|
let thatP = sdkP.entityMap.get(activeIds[i])
|
||||||
// let thatD = sdkD.entityMap.get(activeIds[i])
|
// let thatD = sdkD.entityMap.get(activeIds[i])
|
||||||
if (!thatP || (thatP.type === 'terrain' || !thatP.show) || thatP.type === 'TextBox') {
|
if (!thatP || (thatP.type === 'terrain' || !thatP.show) || thatP.type === 'TextBox') {
|
||||||
leftElm.style.display = 'none'
|
|
||||||
rightElm.style.display = 'none'
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
leftElm.style.display = 'unset'
|
leftElm.style.display = 'unset'
|
||||||
|
Reference in New Issue
Block a user