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
|
<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);
|
||||||
|
|||||||
Reference in New Issue
Block a user