File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ const widgetDefinition = {
58
58
}
59
59
60
60
var graphDiv = document . getElementById ( el . id ) ;
61
+
62
+ // Used by Displayr to determine when widget is ready to be snapshot for testing
63
+ graphDiv . setAttribute ( "rhtmlwidget-status" , "loading" ) ;
61
64
62
65
// TODO: move the control panel injection strategy inside here...
63
66
HTMLWidgets . addPostRenderHandler ( function ( ) {
@@ -551,6 +554,11 @@ const widgetDefinition = {
551
554
} ) ;
552
555
}
553
556
} // end of selectionChange
557
+
558
+ graphDiv . on ( "plotly_afterplot" , function ( ) {
559
+ // Used by Displayr to determine when widget is ready to be snapshot for testing
560
+ graphDiv . setAttribute ( "rhtmlwidget-status" , "ready" ) ;
561
+ } ) ;
554
562
} // end of renderValue
555
563
}
556
564
You can’t perform that action at this time.
0 commit comments