Use localvalue to separate markers and navigation route

This commit is contained in:
2021-09-06 16:43:42 +02:00
parent 2e7602a928
commit 0c1abff773
2 changed files with 11 additions and 5 deletions

2
dist/js/field.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
<field-polyline <field-polyline
:edit="edit" :edit="edit"
:field="field" :field="field"
:value="value" :value="localValue"
@input="triggerChange" @input="triggerChange"
/> />
</div> </div>
@@ -28,12 +28,16 @@ export default {
data() { data() {
return { return {
startBounds: undefined, localValue: {},
markerBeingDragged: undefined,
lastMarkerAddedTime: 0,
}; };
}, },
created() {
if (this.value !== null) {
this.localValue = this.value;
}
},
methods: { methods: {
queryNavigation(markers) { queryNavigation(markers) {
const cords = markers const cords = markers
@@ -58,6 +62,8 @@ export default {
return; return;
} }
this.localValue = markers;
console.log("forwarding markers:", markers); console.log("forwarding markers:", markers);
const navigationRouteCoords = await this.queryNavigation(markers); const navigationRouteCoords = await this.queryNavigation(markers);
console.log("got navigationRouteCoords:", navigationRouteCoords); console.log("got navigationRouteCoords:", navigationRouteCoords);