Skip to content

Commit ee71639

Browse files
committed
🎨: properly factor in padding when computing line breaks by-words
1 parent e76487d commit ee71639

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
@@ -540,7 +540,7 @@ class DOMTextMeasure {
540540
measuringState.emptySpace -= hit;
541541
break;
542542
case 'by-words':
543-
if (measuringState.wordLength < morph.width) {
543+
if (measuringState.wordLength < emptySpace) {
544544
if (measuringState.emptySpaceForWord < measuringState.wordLength && code !== 32) {
545545
measuringState.virtualRow++;
546546
measuringState.currentWord.forEach(entry => entry[1] = measuringState.virtualRow);

0 commit comments

Comments
 (0)