File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,18 @@ var vizClipboard1=null;
130130 function displayChartsOnFrontEnd ( ) {
131131
132132 $ ( 'div.visualizer-front:not(.viz-facade-loaded):not(.visualizer-lazy):not(.visualizer-cw-error):empty' ) . each ( function ( index , element ) {
133- if ( $ ( element ) . is ( ':visible' ) ) {
134- var id = $ ( element ) . addClass ( 'viz-facade-loaded' ) . attr ( 'id' ) ;
135- setTimeout ( function ( ) {
136- // Add a short delay between each chart to avoid overloading the browser event loop.
137- showChart ( id ) ;
138- } , ( index + 1 ) * 100 ) ;
133+
134+ // Do not render charts that are intentionally hidden.
135+ var style = window . getComputedStyle ( element ) ;
136+ if ( style . display === 'none' || style . visibility === 'hidden' ) {
137+ return ;
139138 }
139+
140+ var id = $ ( element ) . addClass ( 'viz-facade-loaded' ) . attr ( 'id' ) ;
141+ setTimeout ( function ( ) {
142+ // Add a short delay between each chart to avoid overloading the browser event loop.
143+ showChart ( id ) ;
144+ } , ( index + 1 ) * 100 ) ;
140145 } ) ;
141146
142147 // interate through all charts that are to be lazy-loaded and observe each one.
You can’t perform that action at this time.
0 commit comments