-
Notifications
You must be signed in to change notification settings - Fork 180
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
DDF-04363 Fixed off-by-one error for negative decimal coordinates in tooltip #4364
Conversation
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.
It would be worth pulling this function into it's own file and adding a few tests to ensure the behavior doesn't regress in the future.
2898b6d
to
92cc3a6
Compare
@@ -14,6 +14,7 @@ | |||
**/ | |||
/*global require*/ | |||
import React from 'react' | |||
import leftPad from '../../react-component/utils/left-pad' |
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.
Might consider using String.prototype.padStart
here instead.
build now |
Internal build has been scheduled, your results will be available at build completion. |
Refer to this link for build results (access rights to CI server needed): |
build now |
Internal build has been scheduled, your results will be available at build completion. |
1 similar comment
Internal build has been scheduled, your results will be available at build completion. |
Refer to this link for build results (access rights to CI server needed): |
Hero Successful 🎉
|
What does this PR do?
Before, the
leftPad
method inmap-info.view.js
, which is used in the tooltip's<span>
to format the latitude and longitude, was being passedMath.floor(lat)
andMath.floor(lon)
. This caused the off-by-one error because whenMath.floor()
is evaluated on -179.152798 for example, it returns -180. This PR makes some adjustments to avoid the off-by-one behavior on negative decimal coordinates in both the 2D and 3D maps.Who is reviewing it?
@Bdthomson
@andrewzimmer
@nsuvarna
Select relevant component teams:
Ask 2 committers to review/merge the PR and tag them here.
@andrewkfiedler
@bdeining
@djblue
How should this be tested?
Follow the steps to reproduce in the issue and verify that you now see the expected behavior
Any background context you want to provide?
What are the relevant tickets?
For GH Issues:
Fixes: #4363
Screenshots
Checklist:
Notes on Review Process
Please see Notes on Review Process for further guidance on requirements for merging and abbreviated reviews.
Review Comment Legend: