mirror of
https://github.com/typst/typst
synced 2025-05-20 20:15:29 +08:00
Fix some comments
This commit is contained in:
parent
0ad0fa5a05
commit
5677766715
@ -31,7 +31,7 @@ impl Linear {
|
||||
Self { rel, abs }
|
||||
}
|
||||
|
||||
/// Resolve this relative to the given `length`.
|
||||
/// Resolve this linear's relative component to the given `length`.
|
||||
pub fn resolve(self, length: Length) -> Length {
|
||||
self.rel.resolve(length) + self.abs
|
||||
}
|
||||
|
@ -190,9 +190,15 @@ impl<'a> GridLayouter<'a> {
|
||||
/// Determine all column sizes.
|
||||
fn measure_columns(&mut self, ctx: &mut LayoutContext) {
|
||||
enum Case {
|
||||
/// The column sizing is only determined by specified linear sizes.
|
||||
PurelyLinear,
|
||||
/// The column sizing would be affected by the region size if it was
|
||||
/// smaller.
|
||||
Fitting,
|
||||
/// The column sizing is affected by the region size.
|
||||
Exact,
|
||||
/// The column sizing would be affected by the region size if it was
|
||||
/// larger.
|
||||
Overflowing,
|
||||
}
|
||||
|
||||
@ -284,7 +290,7 @@ impl<'a> GridLayouter<'a> {
|
||||
let mut regions =
|
||||
Regions::one(size, self.regions.base, Spec::splat(false));
|
||||
|
||||
// For fractional rows, we can already resolve the correct
|
||||
// For linear rows, we can already resolve the correct
|
||||
// base, for auto it's already correct and for fr we could
|
||||
// only guess anyway.
|
||||
if let TrackSizing::Linear(v) = self.rows[y] {
|
||||
|
Loading…
x
Reference in New Issue
Block a user