mirror of
https://github.com/KevinMidboe/nova-map-fields.git
synced 2025-10-29 17:50:27 +00:00
Use localvalue to separate markers and navigation route
This commit is contained in:
2
dist/js/field.js
vendored
2
dist/js/field.js
vendored
File diff suppressed because one or more lines are too long
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user