File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -305,19 +305,16 @@ HTMLWidgets.widget({
305
305
// TODO: make this more consistent with Graph() props?
306
306
if ( instance . setProps ) {
307
307
graphDiv . on ( 'plotly_relayout' , function ( d ) {
308
- instance . setProps ( { "input_plotly_relayout" : JSON . stringify ( d ) } ) ;
308
+ instance . setProps ( { "input_plotly_relayout" : d } ) ;
309
309
} ) ;
310
310
graphDiv . on ( 'plotly_hover' , function ( d ) {
311
- var val = JSON . stringify ( eventDataWithKey ( d ) ) ;
312
- instance . setProps ( { "input_plotly_hover" : val } ) ;
311
+ instance . setProps ( { "input_plotly_hover" : eventDataWithKey ( d ) } ) ;
313
312
} ) ;
314
313
graphDiv . on ( 'plotly_click' , function ( d ) {
315
- var val = JSON . stringify ( eventDataWithKey ( d ) ) ;
316
- instance . setProps ( { "input_plotly_click" : val } ) ;
314
+ instance . setProps ( { "input_plotly_click" : eventDataWithKey ( d ) } ) ;
317
315
} ) ;
318
316
graphDiv . on ( 'plotly_selected' , function ( d ) {
319
- var val = JSON . stringify ( eventDataWithKey ( d ) ) ;
320
- instance . setProps ( { "input_plotly_selected" : val } ) ;
317
+ instance . setProps ( { "input_plotly_selected" : eventDataWithKey ( d ) } ) ;
321
318
} ) ;
322
319
graphDiv . on ( 'plotly_unhover' , function ( eventData ) {
323
320
instance . setProps ( { "input_plotly_hover" : null } ) ;
You can’t perform that action at this time.
0 commit comments