@@ -303,29 +303,29 @@ HTMLWidgets.widget({
303303
304304 // send user input event data to dashR
305305 // TODO: make this more consistent with Graph() props?
306- if ( typeof instance . setProps === "function" ) {
306+ if ( typeof el . setProps === "function" ) {
307307 graphDiv . on ( 'plotly_relayout' , function ( d ) {
308- instance . setProps ( { "input_plotly_relayout" : d } ) ;
308+ el . setProps ( { "input_plotly_relayout" : d } ) ;
309309 } ) ;
310310 graphDiv . on ( 'plotly_hover' , function ( d ) {
311- instance . setProps ( { "input_plotly_hover" : eventDataWithKey ( d ) } ) ;
311+ el . setProps ( { "input_plotly_hover" : eventDataWithKey ( d ) } ) ;
312312 } ) ;
313313 graphDiv . on ( 'plotly_click' , function ( d ) {
314- instance . setProps ( { "input_plotly_click" : eventDataWithKey ( d ) } ) ;
314+ el . setProps ( { "input_plotly_click" : eventDataWithKey ( d ) } ) ;
315315 } ) ;
316316 graphDiv . on ( 'plotly_selected' , function ( d ) {
317- instance . setProps ( { "input_plotly_selected" : eventDataWithKey ( d ) } ) ;
317+ el . setProps ( { "input_plotly_selected" : eventDataWithKey ( d ) } ) ;
318318 } ) ;
319319 graphDiv . on ( 'plotly_unhover' , function ( eventData ) {
320- instance . setProps ( { "input_plotly_hover" : null } ) ;
320+ el . setProps ( { "input_plotly_hover" : null } ) ;
321321 } ) ;
322322 graphDiv . on ( 'plotly_doubleclick' , function ( eventData ) {
323- instance . setProps ( { "input_plotly_click" : null } ) ;
323+ el . setProps ( { "input_plotly_click" : null } ) ;
324324 } ) ;
325325 // 'plotly_deselect' is code for doubleclick when in select mode
326326 graphDiv . on ( 'plotly_deselect' , function ( eventData ) {
327- instance . setProps ( { "input_plotly_selected" : null } ) ;
328- instance . setProps ( { "input_plotly_click" : null } ) ;
327+ el . setProps ( { "input_plotly_selected" : null } ) ;
328+ el . setProps ( { "input_plotly_click" : null } ) ;
329329 } ) ;
330330 }
331331
0 commit comments