Compare commits
3 Commits
d7ecd6d865
...
9f35d752c2
Author | SHA1 | Date | |
---|---|---|---|
9f35d752c2 | |||
22f9693957 | |||
e022aa5ef1 |
@ -231,7 +231,11 @@ async function syncData2(sdk, id, entityId) {
|
|||||||
if (obj.showView == 3) {
|
if (obj.showView == 3) {
|
||||||
options.show = false
|
options.show = false
|
||||||
}
|
}
|
||||||
let target = await new obj.constructor(sdk2D, options)
|
let target = await sdk2D.entityMap.get(options.id)
|
||||||
|
if(target) {
|
||||||
|
await target.remove()
|
||||||
|
}
|
||||||
|
target = await new obj.constructor(sdk2D, options)
|
||||||
target.onClick = obj.onClick
|
target.onClick = obj.onClick
|
||||||
target.onRightClick = obj.onRightClick
|
target.onRightClick = obj.onRightClick
|
||||||
target.onMouseMove = obj.onMouseMove
|
target.onMouseMove = obj.onMouseMove
|
||||||
|
@ -81,6 +81,16 @@ class GroundImage extends Base {
|
|||||||
this.create()
|
this.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get name() {
|
||||||
|
return this.options.name
|
||||||
|
}
|
||||||
|
|
||||||
|
set name(v) {
|
||||||
|
super.name = v
|
||||||
|
this.options.label.text = this.options.name
|
||||||
|
this.entity && (this.entity.label.text = this.options.label.text)
|
||||||
|
}
|
||||||
|
|
||||||
get mode() {
|
get mode() {
|
||||||
return this.options.mode
|
return this.options.mode
|
||||||
}
|
}
|
||||||
|
@ -1526,6 +1526,9 @@ class GroundSvg extends Base {
|
|||||||
controlPoints[9] = turf.destination(point, wh, 0 + angle, options).geometry.coordinates
|
controlPoints[9] = turf.destination(point, wh, 0 + angle, options).geometry.coordinates
|
||||||
|
|
||||||
this.controlPoints = controlPoints
|
this.controlPoints = controlPoints
|
||||||
|
if(!this.sdk || !this.sdk.viewer) {
|
||||||
|
return
|
||||||
|
}
|
||||||
for (let i = 0; i < this.controlPoints.length; i++) {
|
for (let i = 0; i < this.controlPoints.length; i++) {
|
||||||
let color = '#00ff0a'
|
let color = '#00ff0a'
|
||||||
if (i === 5) {
|
if (i === 5) {
|
||||||
|
@ -1922,6 +1922,19 @@ class SectorObject extends Base {
|
|||||||
that.cartesian3Towgs84(positions[1], that.sdk.viewer),
|
that.cartesian3Towgs84(positions[1], that.sdk.viewer),
|
||||||
that.cartesian3Towgs84(positions[positions.length - 4], that.sdk.viewer)
|
that.cartesian3Towgs84(positions[positions.length - 4], that.sdk.viewer)
|
||||||
]
|
]
|
||||||
|
let objectsToExclude = [...that.sdk.viewer.entities.values]
|
||||||
|
that
|
||||||
|
.getClampToHeight({
|
||||||
|
lng: that.options.center.lng,
|
||||||
|
lat: that.options.center.lat
|
||||||
|
}, objectsToExclude)
|
||||||
|
.then(height => {
|
||||||
|
that.label.position = [
|
||||||
|
that.options.center.lng,
|
||||||
|
that.options.center.lat,
|
||||||
|
height
|
||||||
|
]
|
||||||
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
createNodePoints(positions[1], 'sector-start')
|
createNodePoints(positions[1], 'sector-start')
|
||||||
createNodePoints(positions[positions.length - 4], 'sector-end')
|
createNodePoints(positions[positions.length - 4], 'sector-end')
|
||||||
|
Reference in New Issue
Block a user