You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/CHANGES.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,7 @@ Change log
97
97
98
98
## 9.0.1-dev (TBD)
99
99
* fix 'resizecontent' event fix not called.
100
+
* partial fix [#2427](https://github.com/gridstack/gridstack.js/issues/2427) fitToContent when calling cellHeight()/addWidget()/MakeWidget()
100
101
101
102
## 9.0.1 (2023-08-27)
102
103
* fix [#2413](https://github.com/gridstack/gridstack.js/issues/2413) support touchscreen+mouse devices. Thank you [@Ruslan207](https://github.com/Ruslan207)
// NOTE: clientHeight & getBoundingClientRect() is undefined for text and other leaf nodes. use <div> container!
1275
1282
if(!child){console.log(`Error: resizeToContent() '${GridStack.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return;}
1276
-
constitemH=item.clientHeight;// available height to our child (minus border, padding...)
1283
+
constpadding=el.clientHeight-item.clientHeight;// full - available height to our child (minus border, padding...)
1284
+
constitemH=n.h ? n.h*cell-padding : item.clientHeight;// calculated to what cellHeight is or will become (rather than actual to prevent waiting for animation to finish)
0 commit comments