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