mol_dump_lib 0.0.649 → 0.0.651
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.
- package/node.js +6 -6
- package/node.js.map +1 -1
- package/node.mjs +6 -6
- package/node.test.js +6 -6
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.js +6 -6
- package/web.js.map +1 -1
- package/web.mjs +6 -6
package/node.js
CHANGED
|
@@ -4607,7 +4607,7 @@ var $;
|
|
|
4607
4607
|
min = 0;
|
|
4608
4608
|
top = Math.ceil(rect?.top ?? 0);
|
|
4609
4609
|
while (min < (kids.length - 1)) {
|
|
4610
|
-
const height = kids[min]
|
|
4610
|
+
const height = kids[min]?.minimal_height() ?? 0;
|
|
4611
4611
|
if (top + height >= limit_top)
|
|
4612
4612
|
break;
|
|
4613
4613
|
top += height;
|
|
@@ -4629,21 +4629,21 @@ var $;
|
|
|
4629
4629
|
}
|
|
4630
4630
|
while (anchoring && ((top2 > limit_top) && (min2 > 0))) {
|
|
4631
4631
|
--min2;
|
|
4632
|
-
top2 -= kids[min2]
|
|
4632
|
+
top2 -= kids[min2]?.minimal_height() ?? 0;
|
|
4633
4633
|
}
|
|
4634
4634
|
while (bottom2 < limit_bottom && max2 < kids.length) {
|
|
4635
|
-
bottom2 += kids[max2]
|
|
4635
|
+
bottom2 += kids[max2]?.minimal_height() ?? 0;
|
|
4636
4636
|
++max2;
|
|
4637
4637
|
}
|
|
4638
4638
|
return [min2, max2];
|
|
4639
4639
|
}
|
|
4640
4640
|
gap_before() {
|
|
4641
4641
|
const skipped = this.sub().slice(0, this.view_window()[0]);
|
|
4642
|
-
return Math.max(0, skipped.reduce((sum, view) => sum + view
|
|
4642
|
+
return Math.max(0, skipped.reduce((sum, view) => sum + (view?.minimal_height() ?? 0), 0));
|
|
4643
4643
|
}
|
|
4644
4644
|
gap_after() {
|
|
4645
4645
|
const skipped = this.sub().slice(this.view_window()[1]);
|
|
4646
|
-
return Math.max(0, skipped.reduce((sum, view) => sum + view
|
|
4646
|
+
return Math.max(0, skipped.reduce((sum, view) => sum + (view?.minimal_height() ?? 0), 0));
|
|
4647
4647
|
}
|
|
4648
4648
|
sub_visible() {
|
|
4649
4649
|
return [
|
|
@@ -4655,7 +4655,7 @@ var $;
|
|
|
4655
4655
|
minimal_height() {
|
|
4656
4656
|
return this.sub().reduce((sum, view) => {
|
|
4657
4657
|
try {
|
|
4658
|
-
return sum + view
|
|
4658
|
+
return sum + (view?.minimal_height() ?? 0);
|
|
4659
4659
|
}
|
|
4660
4660
|
catch (error) {
|
|
4661
4661
|
$mol_fail_log(error);
|