|
88 | 88 | document.body.dispatchEvent(event);
|
89 | 89 | };
|
90 | 90 |
|
91 |
| - // facade loads N times in the library (where N = the number of different chart libraries supported) |
| 91 | + // facade loads N times in the library and front end (where N = the number of different chart libraries supported) |
92 | 92 | // so all charts are also loaded N times
|
93 | 93 | // this will ensure that no matter how many times facade is loaded, it initializes all charts only once.
|
94 | 94 | // fixed as part of the issue to add annotations.
|
95 |
| - if(visualizer.page_type === 'library'){ |
96 |
| - if(localStorage.getItem( 'viz-facade-loaded' ) === '1'){ |
97 |
| - // prevent library from hanging. |
98 |
| - setTimeout( function(){ |
99 |
| - localStorage.removeItem( 'viz-facade-loaded' ); |
100 |
| - }, 2000); |
101 |
| - return; |
102 |
| - } |
103 |
| - localStorage.setItem( 'viz-facade-loaded', '1'); |
104 |
| - // remove the flag so that repeated loading of the library does not cause problems. |
| 95 | + if(localStorage.getItem( 'viz-facade-loaded' ) === '1'){ |
| 96 | + // prevent library from hanging. |
105 | 97 | setTimeout( function(){
|
106 | 98 | localStorage.removeItem( 'viz-facade-loaded' );
|
107 | 99 | }, 2000);
|
| 100 | + return; |
108 | 101 | }
|
| 102 | + localStorage.setItem( 'viz-facade-loaded', '1'); |
| 103 | + // remove the flag so that repeated loading of the library does not cause problems. |
| 104 | + setTimeout( function(){ |
| 105 | + localStorage.removeItem( 'viz-facade-loaded' ); |
| 106 | + }, 2000); |
| 107 | + |
109 | 108 | $('body').trigger('visualizer:render:chart:start', visualizer);
|
110 | 109 | initActionsButtons(visualizer);
|
111 | 110 | registerDefaultActions();
|
|
0 commit comments