Skip to content

Commit ddd59e0

Browse files
mgermeriegchoqueux
authored andcommittedAug 4, 2021
fix(Label): clamp labels altitude over 0
1 parent 08528d7 commit ddd59e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/Core/Label.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class Label extends THREE.Object3D {
206206
}
207207

208208
updateElevationFromLayer(layer) {
209-
const elevation = DEMUtils.getElevationValueAt(layer, this.coordinates, DEMUtils.FAST_READ_Z);
209+
const elevation = Math.max(0, DEMUtils.getElevationValueAt(layer, this.coordinates, DEMUtils.FAST_READ_Z));
210210
if (elevation && elevation != this.coordinates.z) {
211211
this.coordinates.z = elevation;
212212
this.updateHorizonCullingPoint();

0 commit comments

Comments
 (0)
Please sign in to comment.