12-17
This commit is contained in:
@ -1397,7 +1397,7 @@ class AssembleObject extends Base {
|
||||
this.previous = null
|
||||
this.positionEditing = false
|
||||
|
||||
if(this._positionEditingCallback) {
|
||||
if (this._positionEditingCallback) {
|
||||
this._positionEditingCallback()
|
||||
this._positionEditingCallback = null
|
||||
}
|
||||
@ -1510,7 +1510,7 @@ class AssembleObject extends Base {
|
||||
return this._areaChangeCallBack
|
||||
}
|
||||
|
||||
set areaChangeCallBack (cd) {
|
||||
set areaChangeCallBack(cd) {
|
||||
this._areaChangeCallBack = cd
|
||||
}
|
||||
|
||||
@ -1644,18 +1644,20 @@ class AssembleObject extends Base {
|
||||
let polygon = turf.polygon(points)
|
||||
let centroid = turf.pointOnFeature(polygon)
|
||||
let objectsToExclude = [...this.sdk.viewer.entities.values]
|
||||
this
|
||||
.getClampToHeight({
|
||||
lng: centroid.geometry.coordinates[0],
|
||||
lat: centroid.geometry.coordinates[1]
|
||||
}, objectsToExclude)
|
||||
.then(height => {
|
||||
this.label.position = [
|
||||
centroid.geometry.coordinates[0],
|
||||
centroid.geometry.coordinates[1],
|
||||
height
|
||||
]
|
||||
})
|
||||
setTimeout(() => {
|
||||
this
|
||||
.getClampToHeight({
|
||||
lng: centroid.geometry.coordinates[0],
|
||||
lat: centroid.geometry.coordinates[1]
|
||||
}, objectsToExclude)
|
||||
.then(height => {
|
||||
this.label.position = [
|
||||
centroid.geometry.coordinates[0],
|
||||
centroid.geometry.coordinates[1],
|
||||
height
|
||||
]
|
||||
})
|
||||
}, 200);
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user