mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
Polygon checkbox working active and inactive; need to hook up action to filter through events
This commit is contained in:
@@ -515,9 +515,15 @@ export function mapStyleByShape(shapes, activeShapes) {
|
||||
const styledShapes = shapes.map((s) => {
|
||||
const { colour, shape, title } = s;
|
||||
const style = {
|
||||
background: activeShapes.includes(title) ? colour : "none",
|
||||
border: `1px solid ${colour}`,
|
||||
clipPath: POLYGON_CLIP_PATH[shape],
|
||||
checkboxStyles: {
|
||||
background: activeShapes.includes(title) ? colour : "black",
|
||||
border: "none",
|
||||
clipPath: POLYGON_CLIP_PATH[shape],
|
||||
},
|
||||
containerStyles: {
|
||||
background: colour,
|
||||
clipPath: POLYGON_CLIP_PATH[shape],
|
||||
},
|
||||
};
|
||||
s.styles = style;
|
||||
return s;
|
||||
|
||||
Reference in New Issue
Block a user