Skip to content
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

Improvement in how gl2d refs to fullLayout are updated #1319

Merged
merged 3 commits into from Jan 19, 2017

Conversation

etpinard
Copy link
Contributor

to be merged into #1301

This PR doesn't add any new functionality. It cleans up how fullLayout is updated to the scene2d instances after Plots.supplyDefaults create a new fullLayout from {}.

Previously, scene2d instances relied on scene2d.plot to update their ref to fullLayout. Now, this is done inside Plots.supplyDefaults so that

gd._fullLayout === gd._fullLayout._plots[subplotId]._scene2d.fullLayout
// true

before and after Plots.supplyDefaults.

- as the full Plots.supplyDefaults is called before the
  doModeBar subroutine.
- scene2d.updateRefs is now called on scene2d.plot
  and during Plots.supplyDefaults, ensuring that
  scene2d.fullLayout is up-to-date with gd._fullLayout.
- call after each mouse-change / wheel-change,
  as opposed to each time the scene2d ticks changed
  (which didn't cover all the cases)
- make sure gl2d pan test `mouseup` to trigger relayoutCallback
@etpinard etpinard added this to the v1.22.0 milestone Jan 19, 2017
@etpinard etpinard merged commit 5f36071 into annotations-gl2d Jan 19, 2017
@etpinard etpinard deleted the gl2d-tmpper branch January 19, 2017 15:00
@etpinard etpinard mentioned this pull request Jan 19, 2017
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant