move min degrees for start dot render to a const
This commit is contained in:
@@ -29,6 +29,7 @@ interface RadialArcPathPropsWithGuideDot extends RadialArcPathPropsBase {
|
||||
|
||||
type RadialArcPathProps = RadialArcPathPropsBase | RadialArcPathPropsWithGuideDot;
|
||||
|
||||
const DOT_START_MIN_ANGLE_DEG = 5;
|
||||
const DOT_OPACITY = 0.5;
|
||||
const DOT_RADIUS_FACTOR = 0.4;
|
||||
const MAX_DOT_RADIUS = 8;
|
||||
@@ -103,7 +104,7 @@ export const RadialArcPath = memo(
|
||||
{endpointColors && <circle cx={x2} cy={y2} r={barWidth / 2} fill={endpointColors[1]} />}
|
||||
</g>
|
||||
|
||||
{guideDotColors && arcLengthDeg > 5 && (
|
||||
{guideDotColors && arcLengthDeg > DOT_START_MIN_ANGLE_DEG && (
|
||||
<circle cx={x1} cy={y1} r={dotRadius} fill={guideDotColors[0]} opacity={DOT_OPACITY} />
|
||||
)}
|
||||
{guideDotColors && <circle cx={x2} cy={y2} r={dotRadius} fill={guideDotColors[1]} opacity={DOT_OPACITY} />}
|
||||
|
||||
Reference in New Issue
Block a user