Fix: fix rendering of 'scissors' icon when splitting way

This commit is contained in:
Pieter Vander Vennet 2025-08-19 16:54:07 +02:00
parent b07ebf0cac
commit 4a63ca8cb6

View file

@ -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>