dev #160
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import journey_wrapper from "./types/wrapper";
|
import journey_wrapper from "./types/wrapper";
|
||||||
import { migrator } from "./types/migration";
|
import { migrator } from "./types/migration";
|
||||||
@ -31,7 +32,7 @@ const app = new Vue({
|
|||||||
monthBeforeYear: true,
|
monthBeforeYear: true,
|
||||||
},
|
},
|
||||||
polyline: {
|
polyline: {
|
||||||
latlngs: [[47.334852, -1.509485], [47.342596, -1.328731], [47.241487, -1.190568], [47.234787, -1.358337]],
|
latlngs: [],
|
||||||
color: 'green'
|
color: 'green'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -65,7 +66,7 @@ const app = new Vue({
|
|||||||
search_flight: function (txt) {
|
search_flight: function (txt) {
|
||||||
if (txt == "") return;
|
if (txt == "") return;
|
||||||
this.querying.flight = true;
|
this.querying.flight = true;
|
||||||
api.query_flight(txt.replace(" ", "")).then((results) => {
|
api.query_flight(txt).then((results) => {
|
||||||
if (results.results == "") {
|
if (results.results == "") {
|
||||||
this.query.flight = [];
|
this.query.flight = [];
|
||||||
this.querying.flight = false;
|
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.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.debounceSave = api.throttle(this.save_data, 500);
|
||||||
this.debounceSearch = {
|
this.debounceSearch = {
|
||||||
hotel: api.throttle((q) => {
|
hotel: api.throttle((q) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user