Update src/client/old.js
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
sora-ext 2025-02-25 18:02:19 +01:00
parent 1df6f14f1a
commit c307dd0a22

View File

@ -1,3 +1,4 @@
import * as api from "./api";
import journey_wrapper from "./types/wrapper";
import { migrator } from "./types/migration";
@ -31,7 +32,7 @@ const app = new Vue({
monthBeforeYear: true,
},
polyline: {
latlngs: [[47.334852, -1.509485], [47.342596, -1.328731], [47.241487, -1.190568], [47.234787, -1.358337]],
latlngs: [],
color: 'green'
}
},
@ -65,7 +66,7 @@ const app = new Vue({
search_flight: function (txt) {
if (txt == "") return;
this.querying.flight = true;
api.query_flight(txt.replace(" ", "")).then((results) => {
api.query_flight(txt).then((results) => {
if (results.results == "") {
this.query.flight = [];
this.querying.flight = false;
@ -139,6 +140,14 @@ const app = new Vue({
api.load(this.journey.id).then((r) => (app.journey.data = migrator(r)));
api.query_flight("qf1").then(r => {
console.log(r)
this.polyline.latlngs = L.geodesic([
new L.LatLng(r[0].from_geo.lat, r[0].from_geo.lon),
new L.LatLng(r[0].to_geo.lat, r[0].to_geo.lon)], {})._latlngs
})
this.debounceSave = api.throttle(this.save_data, 500);
this.debounceSearch = {
hotel: api.throttle((q) => {