mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Use geojson hashcode instead of id for path cache
This commit is contained in:
@@ -169,11 +169,11 @@ export function svgPath(projection, graph, isArea) {
|
||||
};
|
||||
|
||||
svgpath.geojson = function(d) {
|
||||
if (d.id !== undefined) {
|
||||
if (d.id in cache) {
|
||||
return cache[d.id];
|
||||
if (d.__hashcode__ !== undefined) {
|
||||
if (d.__hashcode__ in cache) {
|
||||
return cache[d.__hashcode__];
|
||||
} else {
|
||||
return cache[d.id] = path(d);
|
||||
return cache[d.__hashcode__] = path(d);
|
||||
}
|
||||
} else {
|
||||
return path(d);
|
||||
|
||||
Reference in New Issue
Block a user