Skip to content

Commit 5514bfe

Browse files
committed
Relay 'plotly_afterplot' event
1 parent 849f5f1 commit 5514bfe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inst/htmlwidgets/plotly.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ HTMLWidgets.widget({
348348
Shiny.setInputValue(".clientValue-plotly_clickannotation-" + x.source, JSON.stringify(d.fullAnnotation));
349349
});
350350

351+
graphDiv.on('plotly_afterplot', function() {
352+
Shiny.setInputValue(".clientValue-plotly_afterplot-" + x.source, "afterplot", {priority: "event"});
353+
});
354+
351355
}
352356

353357
// Given an array of {curveNumber: x, pointNumber: y} objects,

0 commit comments

Comments
 (0)