diff --git a/src/Global/SplitScreen/index.js b/src/Global/SplitScreen/index.js index fe58526..f71eb14 100644 --- a/src/Global/SplitScreen/index.js +++ b/src/Global/SplitScreen/index.js @@ -102,11 +102,20 @@ function off() { let leftCanvas = leftBox.getElementsByTagName('canvas')[0] leftBox.style.width = '100%' leftCanvas.style.width = '100%' + let billboardAttributeBoxs = sdkP.viewer._element.getElementsByClassName('billboard-attribute-box') + for (let i = 0; i < billboardAttributeBoxs.length; i++) { + billboardAttributeBoxs[i].style.display = 'block' + } sdkP = null } async function init(sdk) { + let billboardAttributeBoxs = sdk.viewer._element.getElementsByClassName('billboard-attribute-box') + for (let i = 0; i < billboardAttributeBoxs.length; i++) { + billboardAttributeBoxs[i].style.display = 'none' + } + sdk.entityMap.forEach((item, key) => { if (item.type && item.type == 'TrajectoryMotion' && item.viewFollow) { item.viewFollow = false @@ -911,7 +920,7 @@ async function setSplitDirection(v, id, isoff = false, entityId) { } if (thatP.type === 'GroundSvg' && thatP.text) { thatP.text.show = thatP.textShow - target.textShow = false + target && (target.textShow = false) } if (thatP.label && thatP.labelShow) { thatP.label.entity.show = true diff --git a/src/Obj/Base/BillboardObject/index.js b/src/Obj/Base/BillboardObject/index.js index 322e361..4531fa4 100644 --- a/src/Obj/Base/BillboardObject/index.js +++ b/src/Obj/Base/BillboardObject/index.js @@ -29,7 +29,8 @@ import MouseTip from '../../../MouseTip' import { setSplitDirection, syncSplitData, - setActiveId + setActiveId, + getState } from '../../../Global/SplitScreen' import { setActiveViewer, @@ -2943,6 +2944,9 @@ class BillboardObject extends Base { attributeElm.style.left = '0px' attributeElm.style.width = 0 attributeElm.style.height = 0 + if(getState()) { + attributeElm.style.display = 'none' + } // attributeElm.innerHTML = this.options.richTextContent this.sdk.viewer._element.appendChild(attributeElm) let linkHtml = '' diff --git a/src/Obj/Base/index.js b/src/Obj/Base/index.js index 86f8d5f..160fba9 100644 --- a/src/Obj/Base/index.js +++ b/src/Obj/Base/index.js @@ -137,7 +137,7 @@ class Base extends Tools { this.originalOptions.show = v } } - this.entity._showView = this.showView + this.entity && (this.entity._showView = this.showView) if (this.type == 'layer') { if (this.entity) { this.entity._objectState = this.options.show