Skip to content

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Mar 1, 2016

resolves #126

@mdtusz @mikolalysenko @alexcjohnson @emackey

supplementary background info in #117 and #132

In brief, this PR adds a purge method to the our official API on the Plotly object.

Whereas, the internal Plotly.Plots.purge is meant to prepare the state for subsequent Plotly.plot calls (e.g what Plotly.newPlot does essentially), the proposed Plotly.purge clear the state -- including the gl contexts -- and the graph div instead without the documented all hell braking loose.

image.appendChild(myImage);

gd = document.createElement('div');
gd.id = 'graph';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdtusz not sure why I didn't do this before, now you can use Plotly.plot('graph', [], {}) in the test-dashboard.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍻

@mdtusz
Copy link
Contributor

mdtusz commented Mar 4, 2016

💃

etpinard added a commit that referenced this pull request Mar 11, 2016
@etpinard etpinard merged commit 52a3b09 into master Mar 11, 2016
@etpinard etpinard deleted the expose-purge-method branch March 11, 2016 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plots.purge does not halt render loop for scene or scene2d
2 participants