update default text alignment values (#21443)

This commit is contained in:
KDSBrowne 2024-10-25 14:51:26 -04:00 committed by GitHub
parent c0ed6bc8cd
commit 7a1ae9e350
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,8 @@ import {
DefaultFillStyle,
DefaultFontStyle,
DefaultSizeStyle,
DefaultHorizontalAlignStyle,
DefaultVerticalAlignStyle,
InstancePresenceRecordType,
setDefaultUiAssetUrls,
setDefaultEditorAssetUrls,
@ -552,6 +554,9 @@ const Whiteboard = React.memo((props) => {
setTlEditor(editor);
setTldrawAPI(editor);
DefaultHorizontalAlignStyle.defaultValue = isRTL ? 'end' : 'start';
DefaultVerticalAlignStyle.defaultValue = 'start';
editor?.user?.updateUserPreferences({ locale: language });
const colorStyles = [