Skip to content

Commit 50ae42c

Browse files
merrymanlinusha
authored andcommitted
🎨: properly factor in padding when computing line breaks by-words
1 parent b33a71f commit 50ae42c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lively.morphic/rendering/font-metric.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ class DOMTextMeasure {
560560
measuringState.emptySpace -= hit;
561561
break;
562562
case 'by-words':
563-
if (measuringState.wordLength < morph.width) {
563+
if (measuringState.wordLength < emptySpace) {
564564
if (measuringState.emptySpaceForWord < measuringState.wordLength && code !== 32) {
565565
measuringState.virtualRow++;
566566
measuringState.currentWord.forEach(entry => entry[1] = measuringState.virtualRow);

0 commit comments

Comments
 (0)