forked from MapComplete/MapComplete
Fix: fix rendering of 'scissors' icon when splitting way
This commit is contained in:
parent
b07ebf0cac
commit
4a63ca8cb6
1 changed files with 6 additions and 5 deletions
|
@ -77,7 +77,7 @@
|
|||
Feature<
|
||||
Point,
|
||||
{
|
||||
id: number
|
||||
id: string
|
||||
index: number
|
||||
dist: number
|
||||
location: number
|
||||
|
@ -101,8 +101,8 @@
|
|||
})
|
||||
let id = 0
|
||||
adaptor.lastClickLocation.addCallbackD(({ lon, lat }) => {
|
||||
let projected: Feature<Point, { index: number; id?: number; reuse?: string }> =
|
||||
GeoOperations.nearestPoint(wayGeojson, [lon, lat])
|
||||
let projected: Feature<Point, { index: number; id: string; reuse?: string }> =
|
||||
<any>GeoOperations.nearestPoint(wayGeojson, [lon, lat])
|
||||
|
||||
console.log("Added splitpoint", projected, id)
|
||||
|
||||
|
@ -126,6 +126,7 @@
|
|||
},
|
||||
properties: {
|
||||
index: i + 1,
|
||||
id: "" + id,
|
||||
reuse: "yes",
|
||||
},
|
||||
}
|
||||
|
@ -139,14 +140,14 @@
|
|||
},
|
||||
properties: {
|
||||
index: i,
|
||||
id: "" + id,
|
||||
reuse: "yes",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
projected.properties["id"] = id
|
||||
id++
|
||||
splitPoints.data.push(<any>projected)
|
||||
splitPoints.data.push(projected)
|
||||
splitPoints.ping()
|
||||
})
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue