8000 Add coordinates of mapbox view as a derived property in plotly_relayo… by jonmmease · Pull Request #4413 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Add coordinates of mapbox view as a derived property in plotly_relayo… #4413

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

Merged
merged 9 commits into from
Dec 9, 2019
Prev Previous commit
Next Next commit
update lat/lon variable names, don't assume lon0 < lon1
  • Loading branch information
jonmmease committed Dec 7, 2019
commit 4b2623fda84e818e600c9539ea45b3ce80b558ba
10 changes: 5 additions & 5 deletions test/jasmine/tests/mapbox_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1226,17 +1226,17 @@ describe('@noCI, mapbox plots', function() {
expect(layout.zoom).toBeCloseTo(zoom);
}

function _assert(center, zoom, lonMin, latMin, lonMax, latMax) {
function _assert(center, zoom, lon0, lat0, lon1, lat1) {
_assertLayout(center, zoom);

expect([evtData['mapbox.center'].lon, evtData['mapbox.center'].lat]).toBeCloseToArray(center);
expect(evtData['mapbox.zoom']).toBeCloseTo(zoom);
expect(evtData['mapbox._derived']).toEqual({
coordinates: [
[lonMin, latMax],
[lonMax, latMax],
[lonMax, latMin],
[lonMin, latMin]
[lon0, lat1],
[lon1, lat1],
[lon1, lat0],
[lon0, lat0]
]});
}

Expand Down
0