mirror of
https://gitlab.aliens-lyon.fr/encartes/web-interface.git
synced 2026-03-17 22:51:04 +01:00
Fix color change
This commit is contained in:
parent
948c2df728
commit
818269836d
10
src/Map.js
10
src/Map.js
@ -68,7 +68,15 @@ function list_polygons(request, center, ratio,/* ind,*/ cb, selectedRoom)
|
||||
*/return [(z[1]-center[1])/25, (z[0]-center[0])/25];
|
||||
//}
|
||||
})
|
||||
})).map((x) => {return <Polygon positions={x} key={k} color={selectedRoom === k ? 'red' : 'grey'} onClick={() => cb(k)}><Tooltip>{k}</Tooltip></Polygon>})];
|
||||
})).map((x) => {
|
||||
//return <Polygon positions={x} key={k} color={selectedRoom === k ? 'red' : 'grey'} onClick={() => cb(k)}><Tooltip>{k}</Tooltip></Polygon>
|
||||
|
||||
const color = selectedRoom === k ? 'red' : 'grey';
|
||||
|
||||
return <Polygon positions={x} key={k + color} color={color} onClick={() => cb(k)}>
|
||||
<Tooltip>{k}</Tooltip>
|
||||
</Polygon>
|
||||
})];
|
||||
// })).map((x) => {tarace = tarace+1; return <Polygon positions={x} key={k} pathOptions={{color: 'grey'}}><Tooltip permanent direction={tarace % 2 === 0 ? "bottom" : "top"}>{k}</Tooltip><Popup>Popup</Popup></Polygon>})];
|
||||
}
|
||||
return polygons;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user