mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-29 06:32:52 +00:00
fix: PowerPoint preview centres titles the file aligns left (#32876)
In the PowerPoint preview, a title or subtitle that the file sets to left alignment was drawn centred, the same as one with no alignment at all. Decks made by python-pptx and most deck generators set the alignment on every paragraph, so their left-aligned title slides all came out centred. The preview now keeps a title the file aligns left on the left, and only centres titles and subtitles that leave the alignment open. Fixes #32873
This commit is contained in:
parent
095cca5fca
commit
8fa77c8282
1 changed files with 2 additions and 0 deletions
|
|
@ -257,6 +257,8 @@ const paragraphAlign = (
|
|||
const align = para.getElementsByTagName('a:pPr')[0]?.getAttribute('algn');
|
||||
if (align === 'ctr') return 'center';
|
||||
if (align === 'r') return 'right';
|
||||
// l and the justified modes the preview cannot draw render from the left
|
||||
if (align) return 'left';
|
||||
|
||||
const type = normalizePlaceholderType(ph?.type ?? '');
|
||||
if (type === 'title' || type === 'subTitle') return 'center';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue