Fix: preciseInputPicker will show correct icon if snapped or not snapped to a wall
This commit is contained in:
parent
64728d17db
commit
98703914ca
1 changed files with 6 additions and 2 deletions
|
@ -176,13 +176,13 @@ export default class LocationInput
|
|||
loc.lat,
|
||||
])
|
||||
if (min === undefined) {
|
||||
min = nearestPointOnLine
|
||||
min = { ...nearestPointOnLine }
|
||||
matchedWay = feature
|
||||
continue
|
||||
}
|
||||
|
||||
if (min.properties.dist > nearestPointOnLine.properties.dist) {
|
||||
min = nearestPointOnLine
|
||||
min = { ...nearestPointOnLine }
|
||||
matchedWay = feature
|
||||
}
|
||||
} catch (e) {
|
||||
|
@ -208,6 +208,10 @@ export default class LocationInput
|
|||
}
|
||||
}
|
||||
min.properties = options?.snappedPointTags ?? min.properties
|
||||
min.properties = {
|
||||
...min.properties,
|
||||
_referencing_ways: JSON.stringify([matchedWay.properties.id]),
|
||||
}
|
||||
self.snappedOnto.setData(<any>matchedWay)
|
||||
return min
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue