Compare commits
5 Commits
7b583f761b
...
72fc510167
Author | SHA1 | Date | |
---|---|---|---|
72fc510167 | |||
552c086d3a | |||
603421ea87 | |||
9e0a43a75f | |||
60378db79d |
@ -25,11 +25,11 @@ function MouseRightMenu(sdk, status, callBack) {
|
|||||||
if (eventListener[sdk.div_id].click) {
|
if (eventListener[sdk.div_id].click) {
|
||||||
document.removeEventListener('click', eventListener[sdk.div_id].click)
|
document.removeEventListener('click', eventListener[sdk.div_id].click)
|
||||||
}
|
}
|
||||||
if(!eventListener[sdk.div_id].callBack) {
|
if (!eventListener[sdk.div_id].callBack) {
|
||||||
eventListener[sdk.div_id].callBack = callBack
|
eventListener[sdk.div_id].callBack = callBack
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sdk !== sdkD) {
|
if (sdk !== sdkD) {
|
||||||
eventListener[sdk.div_id].mouseRightMenuEvent &&
|
eventListener[sdk.div_id].mouseRightMenuEvent &&
|
||||||
eventListener[sdk.div_id].mouseRightMenuEvent.destroy()
|
eventListener[sdk.div_id].mouseRightMenuEvent.destroy()
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ function MouseRightMenu(sdk, status, callBack) {
|
|||||||
}
|
}
|
||||||
let entityId = getEntityId(movement)
|
let entityId = getEntityId(movement)
|
||||||
let targetId
|
let targetId
|
||||||
if(Object.prototype.toString.call(entityId) === '[object Object]') {
|
if (Object.prototype.toString.call(entityId) === '[object Object]') {
|
||||||
targetId = entityId.id
|
targetId = entityId.id
|
||||||
entityId = entityId.parentId
|
entityId = entityId.parentId
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ function MouseRightMenu(sdk, status, callBack) {
|
|||||||
menuElm.style.left = left + 'px'
|
menuElm.style.left = left + 'px'
|
||||||
menuElm.style.top = top + 'px'
|
menuElm.style.top = top + 'px'
|
||||||
|
|
||||||
menuElm.addEventListener('contextmenu', function(event) {
|
menuElm.addEventListener('contextmenu', function (event) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
})
|
})
|
||||||
let liElms = menuElm.getElementsByTagName('li')
|
let liElms = menuElm.getElementsByTagName('li')
|
||||||
@ -162,7 +162,7 @@ function MouseRightMenu(sdk, status, callBack) {
|
|||||||
// this.rotateAround(position)
|
// this.rotateAround(position)
|
||||||
break
|
break
|
||||||
case '属性':
|
case '属性':
|
||||||
if(targetId) {
|
if (targetId) {
|
||||||
object.id = targetId
|
object.id = targetId
|
||||||
object.parentId = that.options.id
|
object.parentId = that.options.id
|
||||||
}
|
}
|
||||||
|
@ -2344,6 +2344,9 @@ class BillboardObject extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async updateHeight() {
|
async updateHeight() {
|
||||||
|
if(!this.sdk || !this.sdk.viewer || !this.sdk.viewer.scene) {
|
||||||
|
return
|
||||||
|
}
|
||||||
let height
|
let height
|
||||||
let height2
|
let height2
|
||||||
let point1 = new Cesium.Cartesian3.fromDegrees(
|
let point1 = new Cesium.Cartesian3.fromDegrees(
|
||||||
|
@ -139,6 +139,7 @@ class FlowLine extends Base {
|
|||||||
//创建线
|
//创建线
|
||||||
that.viewer.entities.add({
|
that.viewer.entities.add({
|
||||||
parent: celiangEntity,
|
parent: celiangEntity,
|
||||||
|
id: that.options.id + '-' + new Date().getTime() + index,
|
||||||
polyline: {
|
polyline: {
|
||||||
positions: [start, end],
|
positions: [start, end],
|
||||||
width: that.options.width,
|
width: that.options.width,
|
||||||
@ -215,6 +216,17 @@ class FlowLine extends Base {
|
|||||||
this.getLine(this, this.positions)
|
this.getLine(this, this.positions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
get show() {
|
||||||
|
return this.options.show
|
||||||
|
}
|
||||||
|
|
||||||
|
set show(v) {
|
||||||
|
this.options.show = v
|
||||||
|
let entity = this.viewer.entities.getById(this.options.id)
|
||||||
|
if (entity) {
|
||||||
|
entity.show = v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get heightDifference() {
|
get heightDifference() {
|
||||||
return this.options.heightDifference
|
return this.options.heightDifference
|
||||||
|
Reference in New Issue
Block a user