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< Feature<
Point, Point,
{ {
id: number id: string
index: number index: number
dist: number dist: number
location: number location: number
@ -101,8 +101,8 @@
}) })
let id = 0 let id = 0
adaptor.lastClickLocation.addCallbackD(({ lon, lat }) => { adaptor.lastClickLocation.addCallbackD(({ lon, lat }) => {
let projected: Feature<Point, { index: number; id?: number; reuse?: string }> = let projected: Feature<Point, { index: number; id: string; reuse?: string }> =
GeoOperations.nearestPoint(wayGeojson, [lon, lat]) <any>GeoOperations.nearestPoint(wayGeojson, [lon, lat])
console.log("Added splitpoint", projected, id) console.log("Added splitpoint", projected, id)
@ -126,6 +126,7 @@
}, },
properties: { properties: {
index: i + 1, index: i + 1,
id: "" + id,
reuse: "yes", reuse: "yes",
}, },
} }
@ -139,14 +140,14 @@
}, },
properties: { properties: {
index: i, index: i,
id: "" + id,
reuse: "yes", reuse: "yes",
}, },
} }
} }
projected.properties["id"] = id
id++ id++
splitPoints.data.push(<any>projected) splitPoints.data.push(projected)
splitPoints.ping() splitPoints.ping()
}) })
</script> </script>