File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ function initShiny() {
256
256
var $this = $ ( this ) , binding = $this . data ( 'shiny-output-binding' ) ;
257
257
$this . trigger ( {
258
258
type : 'shiny:visualchange' ,
259
+ visible : ! isHidden ( this ) ,
259
260
binding : binding
260
261
} ) ;
261
262
binding . onResize ( ) ;
@@ -301,12 +302,19 @@ function initShiny() {
301
302
$ ( '.shiny-bound-output' ) . each ( function ( ) {
302
303
delete lastKnownVisibleOutputs [ this . id ] ;
303
304
// Assume that the object is hidden when width and height are 0
304
- if ( isHidden ( this ) ) {
305
+ var hidden = isHidden ( this ) , evt = {
306
+ type : 'shiny:visualchange' ,
307
+ visible : ! hidden
308
+ } ;
309
+ if ( hidden ) {
305
310
inputs . setInput ( '.clientdata_output_' + this . id + '_hidden' , true ) ;
306
311
} else {
307
312
visibleOutputs [ this . id ] = true ;
308
313
inputs . setInput ( '.clientdata_output_' + this . id + '_hidden' , false ) ;
309
314
}
315
+ var $this = $ ( this ) ;
316
+ evt . binding = $this . data ( 'shiny-output-binding' ) ;
317
+ $this . trigger ( evt ) ;
310
318
} ) ;
311
319
// Anything left in lastKnownVisibleOutputs is orphaned
312
320
for ( var name in lastKnownVisibleOutputs ) {
You can’t perform that action at this time.
0 commit comments