Changed back to normal opacities instead of radial gradients; could add a var that's read from the config to determine styling: radial gradient || normal opacity

This commit is contained in:
efarooqui
2020-10-14 22:27:50 -07:00
parent 32da7f0105
commit 2aaa1752ad
3 changed files with 9 additions and 10 deletions

View File

@@ -27,9 +27,9 @@ function ClusterEvents ({
const totalPoints = calculateTotalPoints()
const styles = ({
// fill: colors.fallbackEventColor,
// stroke: colors.darkBackground,
// strokeWidth: 0,
fill: colors.fallbackEventColor,
stroke: colors.darkBackground,
strokeWidth: 0,
fillOpacity: calcClusterOpacity(pointCount, totalPoints),
})
@@ -44,7 +44,7 @@ function ClusterEvents ({
cy='0'
r={calcClusterSize(pointCount, totalPoints)}
style={styles}
fill="url('#myGradient')"
// fill="url('#clusterGradient')"
/>}
</React.Fragment>
)

View File

@@ -2,10 +2,9 @@ import React from 'react'
const DefsClusters = () => (
<defs>
<radialGradient id="myGradient">
<stop offset="10%" stop-color="red" />
<stop offset="95%" stop-color="black" />
{/* <stop offset="95%" stop-color="red" /> */}
<radialGradient id="clusterGradient">
<stop offset="10%" stop-color="red"/>
<stop offset="100%" stop-color="black"/>
</radialGradient>
</defs>
)