@@ -303,29 +303,29 @@ HTMLWidgets.widget({
303
303
304
304
// send user input event data to dashR
305
305
// TODO: make this more consistent with Graph() props?
306
- if ( typeof instance . setProps === "function" ) {
306
+ if ( typeof el . setProps === "function" ) {
307
307
graphDiv . on ( 'plotly_relayout' , function ( d ) {
308
- instance . setProps ( { "input_plotly_relayout" : d } ) ;
308
+ el . setProps ( { "input_plotly_relayout" : d } ) ;
309
309
} ) ;
310
310
graphDiv . on ( 'plotly_hover' , function ( d ) {
311
- instance . setProps ( { "input_plotly_hover" : eventDataWithKey ( d ) } ) ;
311
+ el . setProps ( { "input_plotly_hover" : eventDataWithKey ( d ) } ) ;
312
312
} ) ;
313
313
graphDiv . on ( 'plotly_click' , function ( d ) {
314
- instance . setProps ( { "input_plotly_click" : eventDataWithKey ( d ) } ) ;
314
+ el . setProps ( { "input_plotly_click" : eventDataWithKey ( d ) } ) ;
315
315
} ) ;
316
316
graphDiv . on ( 'plotly_selected' , function ( d ) {
317
- instance . setProps ( { "input_plotly_selected" : eventDataWithKey ( d ) } ) ;
317
+ el . setProps ( { "input_plotly_selected" : eventDataWithKey ( d ) } ) ;
318
318
} ) ;
319
319
graphDiv . on ( 'plotly_unhover' , function ( eventData ) {
320
- instance . setProps ( { "input_plotly_hover" : null } ) ;
320
+ el . setProps ( { "input_plotly_hover" : null } ) ;
321
321
} ) ;
322
322
graphDiv . on ( 'plotly_doubleclick' , function ( eventData ) {
323
- instance . setProps ( { "input_plotly_click" : null } ) ;
323
+ el . setProps ( { "input_plotly_click" : null } ) ;
324
324
} ) ;
325
325
// 'plotly_deselect' is code for doubleclick when in select mode
326
326
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 } ) ;
329
329
} ) ;
330
330
}
331
331
0 commit comments