Polygon checkbox working active and inactive; need to hook up action to filter through events

This commit is contained in:
efarooqui
2021-05-21 14:48:40 -07:00
parent 7156639ec3
commit 8206edb310
5 changed files with 36 additions and 16 deletions

View File

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