This commit is contained in:
Christian Beutel
2024-06-15 18:13:46 +02:00
parent 48c192376c
commit 369e63972c
27 changed files with 1321 additions and 41 deletions

10
web/src/lib/vendor/exif-js/exif.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
interface EXIFStatic {
getData(url: { src: string } | HTMLImageElement | File, callback: (photo: any) => void): any;
getTag(img: { src: string } | HTMLImageElement | File, tag: any): any;
getAllTags(img: string | File): any;
pretty(img: any): string;
readFromBinaryFile(file: any): any;
}
declare var EXIF: EXIFStatic;
export = EXIF;

1047
web/src/lib/vendor/exif-js/exif.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -452,8 +452,7 @@ export const Elevation = L.Control.Elevation = L.Control.extend({
.then(() => {
layer.eachLayer((trkseg) => {
if (trkseg.feature.geometry.type != "Point") {
let geo = L.geoJson(trkseg.toGeoJSON(), { coordsToLatLng: (coords) => L.latLng(coords[0], coords[1], (coords[2] * (this.options.altitudeFactor || 1)) || 0) });
let line = L.hotline(geo.toGeoJSON().features[0].geometry.coordinates, {
let line = L.hotline(this._data.map(m => [m.x, m.y, m[prop] || 0]), {
renderer: L.Hotline.renderer(),
min: isFinite(this.track_info[prop + '_min']) ? this.track_info[prop + '_min'] : 0,
max: isFinite(this.track_info[prop + '_max']) ? this.track_info[prop + '_max'] : 1,
@@ -1037,7 +1036,7 @@ export const Elevation = L.Control.Elevation = L.Control.extend({
// check and fix missing data on last added point
if (i > 0 && isNaN(prev[attr])) {
if (!isNaN(lastValid[attr]) && !isNaN(curr[attr])) {
prev[attr] = (lastValid[attr] + curr[attr]) / 2;
prev[attr] = _.round((lastValid[attr] + curr[attr]) / 2, props.decimals);
} else if (!isNaN(lastValid[attr])) {
prev[attr] = lastValid[attr];
} else if (!isNaN(curr[attr])) {