mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix letter spacing applied to paragraph
This commit is contained in:
@@ -80,7 +80,7 @@
|
|||||||
font-size (f/serialize-font-size font-size)
|
font-size (f/serialize-font-size font-size)
|
||||||
|
|
||||||
line-height (f/serialize-line-height (get span :line-height) paragraph-line-height)
|
line-height (f/serialize-line-height (get span :line-height) paragraph-line-height)
|
||||||
letter-spacing (f/serialize-letter-spacing (get paragraph :letter-spacing))
|
letter-spacing (f/serialize-letter-spacing (get span :letter-spacing))
|
||||||
|
|
||||||
font-weight (get span :font-weight paragraph-font-weight)
|
font-weight (get span :font-weight paragraph-font-weight)
|
||||||
font-weight (f/serialize-font-weight font-weight)
|
font-weight (f/serialize-font-weight font-weight)
|
||||||
|
|||||||
@@ -1967,9 +1967,14 @@ export class SelectionController extends EventTarget {
|
|||||||
this.setSelection(newTextSpan.firstChild, 0, newTextSpan.firstChild, 0);
|
this.setSelection(newTextSpan.firstChild, 0, newTextSpan.firstChild, 0);
|
||||||
}
|
}
|
||||||
// The styles are applied to the paragraph
|
// The styles are applied to the paragraph
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
const paragraph = this.startParagraph;
|
const paragraph = this.startParagraph;
|
||||||
setParagraphStyles(paragraph, newStyles);
|
setParagraphStyles(paragraph, newStyles);
|
||||||
|
// Apply styles to child text spans.
|
||||||
|
for (const textSpan of paragraph.children) {
|
||||||
|
setTextSpanStyles(textSpan, newStyles);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return this.#notifyStyleChange();
|
return this.#notifyStyleChange();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user