fix: use same order of quadrants for radar and grid visualization

Refs: #141
This commit is contained in:
Theresa Henze
2022-10-13 18:13:50 +02:00
committed by Bastian
parent 97a74bb172
commit 36b63db14d
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ function generateCoordinates(
Multiples of PI/2. To apply the calculated position to the specific quadrant. Multiples of PI/2. To apply the calculated position to the specific quadrant.
Order here is counter-clockwise, so we need to "invert" quadrant positions (i.e. swap 2 with 4) Order here is counter-clockwise, so we need to "invert" quadrant positions (i.e. swap 2 with 4)
*/ */
const shift = (pi * [1, 4, 3, 2][blip.quadrantPosition - 1]) / 2; const shift = (pi * [1, 4, 2, 3][blip.quadrantPosition - 1]) / 2;
return { return {
x: xScale(Math.cos(randomDegree + shift) * radius), x: xScale(Math.cos(randomDegree + shift) * radius),

View File

@@ -14,8 +14,8 @@ const QuadrantLabel: React.FC<{
const stylesMap = [ const stylesMap = [
{ top: 0, left: 0 }, { top: 0, left: 0 },
{ top: 0, right: 0 }, { top: 0, right: 0 },
{ bottom: 0, right: 0 },
{ bottom: 0, left: 0 }, { bottom: 0, left: 0 },
{ bottom: 0, right: 0 },
]; ];
return ( return (