Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions js/src/plotly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export async function waitForPlotlyReadyToReveal(
}

function waitForPlotlyAfterPlot(plotEl: HTMLElement): Promise<void> {
// If Plotly has already completed its render, _fullLayout will be populated.
// This avoids waiting for an event that already fired before we subscribed.
if ((plotEl as any)._fullLayout) {
return Promise.resolve();
}

return new Promise((resolve) => {
const handler = () => {
cleanup();
Expand Down
2 changes: 1 addition & 1 deletion shinywidgets/static/output.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading