Skip to content

mapbox zoom/pan event inconsistencies #2742

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

Closed
alexcjohnson opened this issue Jun 18, 2018 · 3 comments · Fixed by #2766
Closed

mapbox zoom/pan event inconsistencies #2742

alexcjohnson opened this issue Jun 18, 2018 · 3 comments · Fixed by #2766
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

Mapbox zoom/pan events don't match the corresponding API calls. Currently mapbox's moveend (which covers pan and wheel zoom) generates a plotly_relayout, as it should, but the data looks like:

{
  mapbox: {
    bearing: 0,
    center: {lon: -48, lat: 7},
    pitch: 0,
    zoom: 1.23
  }
}

whereas the matching Plotly.relayout (in order to not 🔪 the rest of the mapbox object) should be:

{
  'mapbox.bearing': 0,
  'mapbox.center': {lon: -48, lat: 7},
  'mapbox.pitch': 0,
  'mapbox.zoom': 1.23
}

Double-clicking on a mapbox map creates a plotly_doubleclick event with no data - which is fine, we do that in cartesian as well - but we should also emit a plotly_relayout that matches the change in view.

I suppose the first part of this could be viewed as a breaking change, but the second part is simply an omission, a view change that doesn't generate the right event to describe the new view.

@etpinard
Copy link
Contributor

I suppose the first part of this could be viewed as a breaking change

Thinking of the case with mapbox.layers, I'd call the first part a bug.

@etpinard
Copy link
Contributor

but the second part is simply an omission, a view change that doesn't generate the right event to describe the new view.

Hmm, I'm sure other subplots suffer from the same bug. We should check how geo, gl3d, polar and ternary behave.

@etpinard
Copy link
Contributor

Thanks for the report, by the way 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants