点标注属性框增加pdf浏览
This commit is contained in:
@ -304,8 +304,8 @@ function html(that) {
|
||||
</div>
|
||||
</div>
|
||||
</DIV-cy-tab-pane>-->
|
||||
<!-- <DIV-cy-tab-pane label="灯光控制">
|
||||
<div
|
||||
<DIV-cy-tab-pane label="灯光控制">
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: unset;">指令</span>
|
||||
@ -314,7 +314,7 @@ function html(that) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </DIV-cy-tab-pane> -->
|
||||
</DIV-cy-tab-pane>
|
||||
<!-- <DIV-cy-tab-pane label="设置操作点">-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="row">-->
|
||||
|
||||
@ -234,7 +234,7 @@ class BillboardObject extends Base {
|
||||
|
||||
this.#_destroyMouseEvent = () => {
|
||||
this.attributeElm && (this.attributeElm.style.pointerEvents = 'unset')
|
||||
if(this.sdk && this.sdk.viewer && this.sdk.viewer._element) {
|
||||
if (this.sdk && this.sdk.viewer && this.sdk.viewer._element) {
|
||||
this.sdk.viewer._element.onmousemove = null
|
||||
}
|
||||
document.removeEventListener('mouseup', this.#_destroyMouseEvent)
|
||||
@ -745,7 +745,7 @@ class BillboardObject extends Base {
|
||||
if (this.entity) {
|
||||
this.entity.billboard.heightReference = heightMode
|
||||
this.entity.label.heightReference = heightMode
|
||||
if(heightMode == Cesium.HeightReference.CLAMP_TO_GROUND) {
|
||||
if (heightMode == Cesium.HeightReference.CLAMP_TO_GROUND) {
|
||||
if (this.sdk.viewer.scene.terrainProvider.availability) {
|
||||
Cesium.sampleTerrainMostDetailed(
|
||||
this.sdk.viewer.scene.terrainProvider,
|
||||
@ -3180,7 +3180,7 @@ class BillboardObject extends Base {
|
||||
attributeElm.style.left = '0px'
|
||||
attributeElm.style.width = 0
|
||||
attributeElm.style.height = 0
|
||||
if(getState()) {
|
||||
if (getState()) {
|
||||
attributeElm.style.display = 'none'
|
||||
}
|
||||
// attributeElm.innerHTML = this.options.richTextContent
|
||||
@ -3189,7 +3189,13 @@ class BillboardObject extends Base {
|
||||
let goodsHtml = ''
|
||||
let richTextHtml = ''
|
||||
for (let i = 0; i < this.options.attribute.link.content.length; i++) {
|
||||
linkHtml += `<DIV-cy-tab-pane label="${this.options.attribute.link.content[i].name}"><iframe width='100%' height='100%' src="${this.options.attribute.link.content[i].url}" sandbox="allow-scripts allow-same-origin"></iframe></DIV-cy-tab-pane>`
|
||||
const match = this.options.attribute.link.content[i].url.match(/\.([^.?#]+)(?=\?|#|$)/);
|
||||
if(match && (match[1] === 'pdf' || match[1] === 'PDF')) {
|
||||
linkHtml += `<DIV-cy-tab-pane label="${this.options.attribute.link.content[i].name}"><embed width='100%' height='100%' src="${this.options.attribute.link.content[i].url}" type="application/pdf"></embed></DIV-cy-tab-pane>`
|
||||
}
|
||||
else {
|
||||
linkHtml += `<DIV-cy-tab-pane label="${this.options.attribute.link.content[i].name}"><iframe width='100%' height='100%' src="${this.options.attribute.link.content[i].url}" sandbox="allow-scripts allow-same-origin"></iframe></DIV-cy-tab-pane>`
|
||||
}
|
||||
}
|
||||
if (this.options.attribute.goods && this.options.attribute.goods.content && this.options.attribute.goods.content.length > 0) {
|
||||
goodsHtml += `<DIV-cy-tab-pane label="物资">
|
||||
|
||||
Reference in New Issue
Block a user