From 72d61b7e3cfbd3110a779a563ae8b44fb50537be Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Sat, 29 Jan 2022 16:53:28 -0500 Subject: [PATCH] Adjust line positioning with block during reflow --- src/FrameReflower/Block.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/FrameReflower/Block.php b/src/FrameReflower/Block.php index 51396209b..1a2017f94 100644 --- a/src/FrameReflower/Block.php +++ b/src/FrameReflower/Block.php @@ -937,9 +937,19 @@ function reflow(BlockFrameDecorator $block = null) if ($this->_frame->is_absolute()) { if ($auto_top) { $this->_frame->move(0, $top); + + // set line positions + foreach ($this->_frame->get_line_boxes() as $line_box) { + $line_box->y += $top; + } } if ($auto_margin_top) { $this->_frame->move(0, $margin_top, true); + + // set line positions + foreach ($this->_frame->get_line_boxes() as $line_box) { + $line_box->y += $margin_top; + } } }