Skip to content

Commit

Permalink
Merge pull request #112 from azavea/ts/reverse-the-curves
Browse files Browse the repository at this point in the history
Edit money curves to appear to go 'up'
  • Loading branch information
travissouthard committed Apr 17, 2023
2 parents de9a814 + e7efa1b commit 37666d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ and this project adheres to
[#96](https://github.com/azavea/green-equity-demo/pull/96)
- Place category spending percentages directly next to bars
[#103](https://github.com/azavea/green-equity-demo/pull/103)
- [#110](https://github.com/azavea/green-equity-demo/pull/110)
- Recolor state borders [#110](https://github.com/azavea/green-equity-demo/pull/110)
- Make money travel curves go 'up' [#112](https://github.com/azavea/green-equity-demo/pull/112)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ function getBezierOffsetLatLng(end: L.LatLngTuple): L.LatLngTuple {
const r = Math.sqrt(Math.pow(offsetX, 2) + Math.pow(offsetY, 2));
const theta = Math.atan2(offsetY, offsetX);

const thetaOffset = 3.14 / 10;
const thetaOffsetDist = Math.PI / 10;
const thetaOffset = offsetX < 0 ? thetaOffsetDist * -1 : thetaOffsetDist;

const r2 = r / 2 / Math.cos(thetaOffset);
const theta2 = theta + thetaOffset;
Expand Down

0 comments on commit 37666d0

Please sign in to comment.