From 25e603d15fb4a36c3d9eeff39292e9b415299514 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Mon, 11 Jan 2021 21:59:52 +0100 Subject: [PATCH] #115 Nose Wheel --- src/renderer/components/ParkingEdit.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/components/ParkingEdit.vue b/src/renderer/components/ParkingEdit.vue index 37fd87d..3d22bad 100644 --- a/src/renderer/components/ParkingEdit.vue +++ b/src/renderer/components/ParkingEdit.vue @@ -215,7 +215,7 @@ var centerCoords = convert(this.$store.state.Editable.data.parking.coords); if(this.calculate === 'Nose Wheel') { // we change center - const centerLatLng = convert(newValue); + const centerLatLng = convert(this.$store.state.Editable.data.parking.coords); const parkingSize = this.validRadii.indexOf(this.$store.state.Editable.data.parking.radius); if (parkingSize>=0) { var newNoseWheel = turf.destination(this.latToTurf(centerLatLng), this.validN2M[parkingSize]/1000, this.$store.state.Editable.data.parking.heading - 180, turfOptions); @@ -227,7 +227,7 @@ var centerCoords = convert(this.$store.state.Editable.data.parking.coords); if (this.calculate === 'Center') { // we change center - const noseWheelLatLng = convert(this.noseWheel); + const noseWheelLatLng = convert(this.$store.state.Editable.data.parking.nosecoords); const parkingSize = this.validRadii.indexOf(this.$store.state.Editable.data.parking.radius); if (parkingSize>=0) { var newCenter = turf.destination(this.latToTurf(noseWheelLatLng), this.validN2M[parkingSize]/1000, this.$store.state.Editable.data.parking.heading, turfOptions); @@ -236,7 +236,7 @@ } } }, - data () { return {_calculate: 'Center', noseWheel: '', validRadii: [7.5, 10, 14, 18, 26, 33, 40], validN2M: [5, 5, 6, 10, 15, 24, 24] } }, + data () { return {calculateState: 'Nose Wheel', noseWheel: '', validRadii: [7.5, 10, 14, 18, 26, 33, 40], validN2M: [5, 5, 6, 10, 15, 24, 24] } }, computed: { editing: { get: function () { @@ -300,10 +300,10 @@ }, calculate: { get: function () { - return this._calculate; + return this.calculateState; }, set: function (newValue) { - this._calculate = newValue; + this.calculateState = newValue; if (newValue==='Center') { this.calcWheel(); } else {