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({
305305 // TODO: make this more consistent with Graph() props?
306306 if ( instance . setProps ) {
307307 graphDiv . on ( 'plotly_relayout' , function ( d ) {
308- instance . setProps ( { "input_plotly_relayout" : JSON . stringify ( d ) } ) ;
308+ instance . setProps ( { "input_plotly_relayout" : d } ) ;
309309 } ) ;
310310 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 ) } ) ;
313312 } ) ;
314313 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 ) } ) ;
317315 } ) ;
318316 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 ) } ) ;
321318 } ) ;
322319 graphDiv . on ( 'plotly_unhover' , function ( eventData ) {
323320 instance . setProps ( { "input_plotly_hover" : null } ) ;
You can’t perform that action at this time.
0 commit comments