plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

3d camera reset after react

Open nicolaskruchten opened this issue 5 years ago • 8 comments
trafficstars

This one has a very specific replication path from this pen: https://codepen.io/nicolaskruchten/pen/NWxoWGR?editors=0010

  1. newPlot@0
  2. react@1 (this is the critical step to get the figure into the broken state)
  3. do turntable interaction via drag
  4. click on "zoom" modebar icon: the turntable interaction is undone!

Alternate path:

  1. newPlot@0
  2. react@1 (this is the critical step to get the figure into the broken state)
  3. click on "zoom" modebar icon and zoom a bit via drag
  4. click on "turntable" modebar icon: the zoom interaction is undone!

nicolaskruchten avatar Jul 21 '20 18:07 nicolaskruchten

Related to https://github.com/plotly/plotly.js/issues/5004 ? same pen... with uirevision set.

nicolaskruchten avatar Jul 21 '20 18:07 nicolaskruchten

This one is a regression since v1.51.0 and the side effect of #4292.

archmoj avatar Jul 21 '20 18:07 archmoj

Even in 1.50.0 it doesn't behave particularly well... it's easy to get into situations where clicking among the modebar buttons changes the zoom level.

nicolaskruchten avatar Jul 22 '20 14:07 nicolaskruchten

Even in 1.50.0 it doesn't behave particularly well... it's easy to get into situations where clicking among the modebar buttons changes the zoom level.

@nicolaskruchten thanks for investigating that using v1.50.0. Concerning replicating the original issue, would you please keep the version in the original pen at 1.54.6? Thank you.

archmoj avatar Jul 22 '20 15:07 archmoj

Sorry, I didn't fork! I've pinned the pen to -latest

nicolaskruchten avatar Jul 22 '20 15:07 nicolaskruchten

this seems to be the case even switching from zoom to pan and back

nicolaskruchten avatar Jul 28 '20 14:07 nicolaskruchten

Seems related to undefined initial camera position.

archmoj avatar Jul 29 '20 21:07 archmoj

This is very strange bug. The fix works in the dashboard but not in a codepen!

archmoj avatar Jul 29 '20 23:07 archmoj