From da048674f2dc75402efb3ce9846b2a16ab7493a3 Mon Sep 17 00:00:00 2001 From: Tobias Schmitz Date: Fri, 2 May 2025 15:18:41 +0200 Subject: [PATCH] docs: fix comments --- crates/typst-layout/src/grid/layouter.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/typst-layout/src/grid/layouter.rs b/crates/typst-layout/src/grid/layouter.rs index d9ce2a3ae..093d48dd8 100644 --- a/crates/typst-layout/src/grid/layouter.rs +++ b/crates/typst-layout/src/grid/layouter.rs @@ -646,7 +646,7 @@ impl<'a> GridLayouter<'a> { let mut pos = Point::new(dx, dy); if self.is_rtl { // In RTL cells expand to the left, thus the position - // must additionally be offset by the width of the column. + // must additionally be offset by the width of the cell. pos.x = self.width - (dx + width); } let size = Size::new(width, height); @@ -1253,7 +1253,7 @@ impl<'a> GridLayouter<'a> { let mut pos = offset; if self.is_rtl { // In RTL cells expand to the left, thus the position - // must additionally be offset by the width of the column. + // must additionally be offset by the width of the cell. pos.x = self.width - (pos.x + width); } output.push_frame(pos, frame); @@ -1301,6 +1301,8 @@ impl<'a> GridLayouter<'a> { for (output, frame) in outputs.iter_mut().zip(fragment) { let mut pos = offset; if self.is_rtl { + // In RTL cells expand to the left, thus the position + // must additionally be offset by the width of the cell. pos.x = self.width - (offset.x + width); } output.push_frame(pos, frame);