Issues glueing parking
This commit is contained in:
parent
f515d6249f
commit
2d5f2f0063
@ -485,8 +485,10 @@
|
||||
if (event.latlng === undefined) {
|
||||
return
|
||||
}
|
||||
const circle = new L.ParkingSpot(event.latlng, {attributes: {radius: 20, heading: 0}})
|
||||
circle.id = (++this.groundnetLayerGroup.maxId)
|
||||
const newIndex = (++this.groundnetLayerGroup.maxId)
|
||||
const circle = new L.ParkingSpot(event.latlng, {attributes: {index: newIndex, radius: 20, heading: 0}})
|
||||
circle.id = newIndex
|
||||
circle.glueindex = circle.id
|
||||
circle.addTo(this.groundnetLayerGroup)
|
||||
circle.featureLookup = this.featureLookup
|
||||
circle.enableEdit()
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-link type="primary" @click="show(parking.index)">{{parking.name}}{{parking.number}}</el-link>
|
||||
<el-link type="primary" @click="show(parking.index)">{{parking.name}} {{parking.number}}</el-link>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
|
@ -8,7 +8,9 @@ const mutations = {
|
||||
},
|
||||
UPDATE_PARKING: (state, item) => {
|
||||
const existingItem = state.items.find((i) => i.index === item.index)
|
||||
Object.assign(existingItem, item)
|
||||
if (existingItem!==undefined) {
|
||||
Object.assign(existingItem, item)
|
||||
}
|
||||
},
|
||||
SET_PARKINGS (state, parkings) {
|
||||
Vue.set(state, 'items', parkings)
|
||||
|
Loading…
Reference in New Issue
Block a user