aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/MapBox/AnimationUtility.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-02-25 01:03:25 -0500
committerbobzel <zzzman@gmail.com>2025-02-25 01:03:25 -0500
commit515707c4561eb526426b8fa07dd50bd499fb91cc (patch)
treef4cbc69387da19add6dbc88acecbcdbdca575039 /src/client/views/nodes/MapBox/AnimationUtility.ts
parent30b07ed24fbe5e6d49741bc63031807408cd4a0c (diff)
added a hideUI option to hide buttons. fixed a mess of runtime warnings mostly related to how scss files can be included in each other
Diffstat (limited to 'src/client/views/nodes/MapBox/AnimationUtility.ts')
-rw-r--r--src/client/views/nodes/MapBox/AnimationUtility.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/MapBox/AnimationUtility.ts b/src/client/views/nodes/MapBox/AnimationUtility.ts
index f4bae66bb..3eac50f1f 100644
--- a/src/client/views/nodes/MapBox/AnimationUtility.ts
+++ b/src/client/views/nodes/MapBox/AnimationUtility.ts
@@ -65,7 +65,7 @@ export class AnimationUtility {
const coords: mapboxgl.LngLatLike = [this.previousLngLat.lng, this.previousLngLat.lat];
// console.log('MAP REF: ', this.MAP_REF)
// console.log("current elevation: ", this.MAP_REF?.queryTerrainElevation(coords));
- let altitude = this.MAP_REF ? this.MAP_REF.queryTerrainElevation(coords) ?? 0 : 0;
+ let altitude = this.MAP_REF ? (this.MAP_REF.queryTerrainElevation(coords) ?? 0) : 0;
if (altitude === 0) {
altitude += 50;
}
@@ -178,7 +178,7 @@ export class AnimationUtility {
this.ROUTE_COORDINATES = routeCoordinates;
this.PATH = turf.lineString(routeCoordinates);
- this.PATH_DISTANCE = turf.lineDistance(this.PATH);
+ this.PATH_DISTANCE = turf.length(this.PATH);
this.terrainDisplayed = terrainDisplayed;
const bearing = this.calculateBearing(