Open
Conversation
…mponent by adding commented out option for rectangular region picker, slightly altering the map center to better show that the two region picker shapes produce different aggregated stats
|
@Jakidxav is attempting to deploy a commit to the carbonplan Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Supporting a rectangular, bounding box-style option for the
<RegionPicker />component. Currently, only a circular option is available.Changes
srcI added a
<RectanglePicker />component that works very similar to the<CirclePicker />that is currently used. Because some of the code between the picker components is shared, I was able to move theutilsmethods and<CursorManager />component tosrc/region/region-picker/.The
<RegionPicker />component would now accept amodeprop which defaults to'circle', but can toggle between that and the'rectangle'option when rendered within the map component. Right now, only one corner can be used to resize the rectangular region, but future work could extend this to include all corners in order to create custom rectangular region shapes.demoIn the demo app, I commented out the
modeprop for the<RegionPicker />that shows how a user could toggle between the'circle'and'rectangle'options. I also slightly modified the map's starting center location to better show that these two options produce different output when they are initially rendered.pre-commitformattingAll files in this pull request meet
pre-commitchecks. When I run:I see: