mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
temp fix for imprecision in may_progress_with_offset
better idea: check once at the start of the region if there are non-header rows, or we could progress at the start of the region, we may progress
This commit is contained in:
parent
07a060a9da
commit
dafcf8b11e
@ -1802,6 +1802,9 @@ pub(super) fn points(
|
||||
/// additional logic which adds content automatically on each region turn (in
|
||||
/// our case, headers).
|
||||
pub(super) fn may_progress_with_offset(regions: Regions<'_>, offset: Abs) -> bool {
|
||||
// Use 'approx_eq' as float addition and subtraction are not associative.
|
||||
!regions.backlog.is_empty()
|
||||
|| regions.last.is_some_and(|height| regions.size.y + offset != height)
|
||||
|| regions
|
||||
.last
|
||||
.is_some_and(|height| !(regions.size.y + offset).approx_eq(height))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user