Skip to content

Commit

Permalink
fix(InlineContent): remove extra spacing when using newline objects (#…
Browse files Browse the repository at this point in the history
…542)

* fix(InlineContent): remove extra spacing when using newline objects

* fix(InlineContent): clean up height logic
  • Loading branch information
ImCoolNowRight authored Oct 3, 2024
1 parent 2e997c8 commit 409f2f2
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,11 @@ export default class InlineContent extends Base {
) {
let totalHeight = 0;
this.flex._layout._lineLayouter._lines.forEach(line => {
totalHeight += Object.entries(line.items).sort((a, b) => {
return b[1].h - a[1].h;
})[0][1].h;
totalHeight += Object.entries(line.items)
.slice(line.startIndex, line.endIndex + 1)
.sort((a, b) => {
return b[1].h - a[1].h;
})[0][1].h;
});
this.multiLineHeight = totalHeight;

Expand Down

0 comments on commit 409f2f2

Please sign in to comment.