@schneideress/dashboardframework 20.0.8 → 20.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4951,7 +4951,8 @@ class RADashboardArea {
|
|
|
4951
4951
|
let rect = el.getBoundingClientRect();
|
|
4952
4952
|
const height = rect.height;
|
|
4953
4953
|
if (this.hasGrid) {
|
|
4954
|
-
const
|
|
4954
|
+
const effectiveCount = (this.widgetList.length % 2 === 1) ? this.widgetList.length + 1 : this.widgetList.length;
|
|
4955
|
+
const multiplier = Math.max(1, effectiveCount / 2);
|
|
4955
4956
|
this.gridsterHeight = (height + 20) * multiplier + 'px';
|
|
4956
4957
|
}
|
|
4957
4958
|
return rect && rect.top < window.innerHeight;
|
|
@@ -5167,9 +5168,12 @@ class RADashboardArea {
|
|
|
5167
5168
|
}
|
|
5168
5169
|
this.gridheight = areaHeight;
|
|
5169
5170
|
if (this.hasGrid) {
|
|
5170
|
-
const
|
|
5171
|
-
if (
|
|
5172
|
-
this.
|
|
5171
|
+
const baseHeight = this.gridItem.height; // gridster container current height
|
|
5172
|
+
if (baseHeight) {
|
|
5173
|
+
const effectiveCount = (this.widgetList.length % 2 === 1) ? this.widgetList.length + 1 : this.widgetList.length;
|
|
5174
|
+
const multiplier = Math.max(1, effectiveCount / 2);
|
|
5175
|
+
this.gridsterHeight = (baseHeight + 20) * multiplier + 'px';
|
|
5176
|
+
}
|
|
5173
5177
|
}
|
|
5174
5178
|
});
|
|
5175
5179
|
}
|