mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
🐛 Fix letter spacing applied to paragraph
This commit is contained in:
parent
2768d6b2d7
commit
b616656ebc
@ -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)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (c) KALEIDOS INC
|
* Copyright (c) KALEIDOS INC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import SafeGuard from '~/editor/controllers/SafeGuard';
|
import SafeGuard from '../../controllers/SafeGuard.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterator direction.
|
* Iterator direction.
|
||||||
|
|||||||
@ -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();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user