Repository navigation
Unify shape defaults (Circle/Polygon stroke 1, GroundImage opacity 1.0) - #25
Merged
Merged
Conversation
…their states The component form and the state form of the same overlay drew differently when nothing was passed: Circle and GroundImage components used strokeWidth 2 / opacity 0.5 while their states used 1 / 1.0, and PolygonState used strokeWidth 2 while the Polygon component used 1. Defaults are now the same for both forms on React, Android and iOS: Circle / Polygon / Polyline strokeWidth = 1, GroundImage opacity = 1.0. The API baseline changes only in these three default values.
Spherical and WGS84Geodesic return a positive area for a clockwise ring and a negative one for a counter-clockwise ring (north-up), as on Android and the web. Say so in the doc comments and pin it with a test. Behaviour and the API baseline are unchanged.
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.
Unify shape and ground-image defaults across the component and state forms (Circle strokeWidth 1, Polygon strokeWidth 1, GroundImage opacity 1.0), the same on React, Android and iOS. Where touched, also documents computeSignedArea's sign: positive for a clockwise ring, which is what all three platforms already return.
Before, the component and state forms disagreed (Circle 2 vs 1, Polygon 1 vs 2, GroundImage 0.5 vs 1.0), so the same shape looked different depending on how it was declared. Behaviour change for apps relying on the old defaults; decided by the maintainer.
Tests added per platform; browser side-by-side check of component vs state forms.