Search back to normal
This commit is contained in:
parent
6fe95be8f7
commit
bad59e3405
@ -128,7 +128,7 @@
|
||||
searched: function () {
|
||||
console.log(this.searchterm)
|
||||
let searchRegex = new RegExp(this.searchterm, 'i')
|
||||
return this.$store.state.Airports.unfilteredairports
|
||||
return this.$store.state.Airports.airports
|
||||
.filter(a => searchRegex.test(a.properties.icao) || searchRegex.test(a.properties.name))
|
||||
// .map(a => console.log(a.properties))
|
||||
.map(a => ({ icao: a.properties.icao, name: a.properties.name }))
|
||||
|
@ -118,8 +118,10 @@ L.ParkingSpot = L.Circle.extend({
|
||||
return state.Editable.data.parking;
|
||||
},
|
||||
() => {
|
||||
event.target.updateStyle();
|
||||
this.unwatch();
|
||||
if (event.target instanceof L.ParkingSpot) {
|
||||
event.target.setStyle({color : '#3388ff'});
|
||||
this.unwatch();
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -153,6 +155,9 @@ L.ParkingSpot = L.Circle.extend({
|
||||
this.on('editable:disable', function (event) {
|
||||
event.target.removeDirection();
|
||||
});
|
||||
},
|
||||
updateStyle: function () {
|
||||
|
||||
},
|
||||
turfToLatLng: function (turfPoint) {
|
||||
return {lat: turfPoint.geometry.coordinates[1], lng: turfPoint.geometry.coordinates[0]};
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* eslint-disable */
|
||||
import idb from '../api/airports';
|
||||
import Vue from 'vue';
|
||||
|
||||
const ADD_AIRPORT = 'ADD_AIRPORT';
|
||||
const SET_AIRPORTS = 'SET_AIRPORTS';
|
||||
@ -16,7 +17,7 @@ const mutations = {
|
||||
state.airports.push(airports);
|
||||
},
|
||||
SET_AIRPORTS (state, airports) {
|
||||
state.airports = airports;
|
||||
Vue.set(state, 'airports', airports);
|
||||
},
|
||||
SET_UNFILTERED_AIRPORTS (state, airports) {
|
||||
state.unfilteredairports = airports;
|
||||
|
Loading…
Reference in New Issue
Block a user