File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,19 @@ function initAutoResizeForCard(cardId) {
115115 observer . observe ( content ) ;
116116}
117117
118+ function forceGridResize ( cardId ) {
119+ const gridItem = document . getElementById ( cardId ) ;
120+ const content = gridItem . querySelector ( ".card" ) ;
121+
122+ if ( ! gridItem || ! content ) return ;
123+
124+ const newHeightPx = content . scrollHeight ;
125+ const cellHeight = dashboardGrid . getCellHeight ( ) ;
126+ const newGridHeight = Math . ceil ( newHeightPx / cellHeight ) ;
127+
128+ dashboardGrid . update ( gridItem , { h : newGridHeight } ) ;
129+ }
130+
118131document . addEventListener ( "DOMContentLoaded" , async ( ) => {
119132 // --- PHASE 1: Das Gerüst aufbauen ---
120133 initGridstack ( ) ;
Original file line number Diff line number Diff line change @@ -1140,6 +1140,11 @@ async function loadForecast() {
11401140 showShapDetails ( forecast [ index ] ) ;
11411141 }
11421142 }
1143+ animation : {
1144+ onComplete : ( ) = > {
1145+ forceGridResize ( "card-forecast" ) ;
1146+ }
1147+ }
11431148 }
11441149 } ) ;
11451150}
@@ -1171,6 +1176,11 @@ async function loadFeatureImportance() {
11711176 display : false
11721177 }
11731178 }
1179+ animation : {
1180+ onComplete : ( ) = > {
1181+ forceGridResize ( "card-forecast" ) ;
1182+ }
1183+ }
11741184 }
11751185 } ) ;
11761186
@@ -1209,6 +1219,11 @@ async function loadGlobalShap() {
12091219 display : false
12101220 }
12111221 }
1222+ animation : {
1223+ onComplete : ( ) = > {
1224+ forceGridResize ( "card-forecast" ) ;
1225+ }
1226+ }
12121227 }
12131228 } ) ;
12141229
You can’t perform that action at this time.
0 commit comments