From c2d1858e68fc4315500b7fad6a867407e62bec71 Mon Sep 17 00:00:00 2001 From: sora-ext Date: Mon, 24 Feb 2025 17:31:02 +0100 Subject: [PATCH] Update src/old.js --- src/old.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/old.js b/src/old.js index 1796bd4..3a9435d 100644 --- a/src/old.js +++ b/src/old.js @@ -1,6 +1,7 @@ import * as api from "./api"; import journey_wrapper from "./types/wrapper"; +import { migrator } from "./types/migration"; Vue.component("l-map", window.Vue2Leaflet.LMap); Vue.component("l-tile-layer", window.Vue2Leaflet.LTileLayer); @@ -8,6 +9,7 @@ Vue.component("l-marker", window.Vue2Leaflet.LMarker); Vue.component("l-icon", window.Vue2Leaflet.LIcon); Vue.component("l-popup", window.Vue2Leaflet.LPopup); Vue.component("l-tooltip", window.Vue2Leaflet.LTooltip); +Vue.component("l-polyline", window.Vue2Leaflet.LPolyline); Vue.component("l-control-scale", window.Vue2Leaflet.LControlScale); Vue.component("multiselect", window.VueMultiselect.default); Vue.use(window.VueTextareaAutosize); @@ -29,6 +31,10 @@ const app = new Vue({ }, monthBeforeYear: true, }, + polyline: { + latlngs: [[47.334852, -1.509485], [47.342596, -1.328731], [47.241487, -1.190568], [47.234787, -1.358337]], + color: 'green' + } }, methods: { start_journey: () => window.location.href = "/" + this.journey.id, @@ -121,7 +127,7 @@ const app = new Vue({ } }); - api.load(this.journey.id).then((r) => (app.journey.data = r)); + api.load(this.journey.id).then((r) => (app.journey.data = migrator(r))); this.debounceSave = api.throttle(this.save_data, 500); this.debounceSearch = {