-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SIP-5] Repair and refactor CountryMap #5721
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5721 +/- ##
==========================================
- Coverage 63.38% 63.37% -0.02%
==========================================
Files 361 361
Lines 22995 22999 +4
Branches 2559 2566 +7
==========================================
Hits 14575 14575
- Misses 8405 8409 +4
Partials 15 15
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! nice improvements + polish 💖
k = 1; | ||
centered = null; | ||
} | ||
|
||
g.transition() | ||
.duration(750) | ||
.attr('transform', 'translate(' + slice.width() / 2 + ',' + slice.height() / 2 + ')scale(' + k + ')translate(' + -x + ',' + -y + ')'); | ||
.attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')scale(' + k + ')translate(' + -x + ',' + -y + ')'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could use template literals here to be consistent with transform
below
const vscale = scale * height / (bounds[1][1] - bounds[0][1]); | ||
const newScale = (hscale < vscale) ? hscale : vscale; | ||
|
||
// Compute bounds and offset using the updated scale. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Codecov Report
@@ Coverage Diff @@
## master #5721 +/- ##
==========================================
- Coverage 63.78% 63.77% -0.02%
==========================================
Files 364 364
Lines 23073 23078 +5
Branches 2568 2575 +7
==========================================
Hits 14717 14717
- Misses 8341 8346 +5
Partials 15 15
Continue to review full report at Codecov.
|
Used template literal and a few minor tweaks. |
🚢 |
* Extract slice and formData * update css indent * remove no-effect call * improve text label * adjust text size * fix bound calculation * use string literal * make path constant (cherry picked from commit f72cdc3)
* Extract slice and formData * update css indent * remove no-effect call * improve text label * adjust text size * fix bound calculation * use string literal * make path constant
* Extract slice and formData * update css indent * remove no-effect call * improve text label * adjust text size * fix bound calculation * use string literal * make path constant
slice
andformData
Before
![country_map_test](https://user-images.githubusercontent.com/1659771/44612252-99736680-a7bb-11e8-88bf-92f55acc8d58.png)
After
![idhealth__pct_users_identity_verified_for_homes_booking_and_profile__7d_avg](https://user-images.githubusercontent.com/1659771/44612253-9e381a80-a7bb-11e8-975e-884f4c410a40.png)
Before
![country_before](https://user-images.githubusercontent.com/1659771/44612310-4f3eb500-a7bc-11e8-8739-e03f7c599d95.gif)
After
![country_after](https://user-images.githubusercontent.com/1659771/44612314-52d23c00-a7bc-11e8-8257-08858788315c.gif)
@williaster @conglei