Skip to content

Commit

Permalink
Update paragraph.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
yifei8 authored Sep 19, 2023
1 parent 47441f7 commit 2bb279a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webf/lib/src/rendering/paragraph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ class WebFRenderParagraph extends RenderBox

/// Compute distance to baseline of last text line
double computeDistanceToLastLineBaseline() {
if (_lineOffset.isEmpty) {
if (_lineRenders.isEmpty) {
return 0.0;
}
double lastLineOffset = _lineOffset[_lineOffset.length - 1];
double lastLineOffset = _lineRenders[_lineRenders.length - 1].lineRect.top;
ui.LineMetrics lastLineMetrics = _lineMetrics[_lineMetrics.length - 1];

// Use the baseline of the last line as paragraph baseline.
Expand Down

0 comments on commit 2bb279a

Please sign in to comment.