From 38c7d5a7bf6d45bc808103e4930ec6deafb0d22c Mon Sep 17 00:00:00 2001 From: fujimoto kyosuke <31386431+lusingander@users.noreply.github.com> Date: Sat, 18 Apr 2020 23:43:21 +0900 Subject: [PATCH] Reflect `textAlign` when pasting a style (#1378) * Reflect `textAlign` when pasting a style * Re-run Actions --- src/actions/actionStyles.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/actionStyles.ts b/src/actions/actionStyles.ts index ffe041e0..9d6cbbe7 100644 --- a/src/actions/actionStyles.ts +++ b/src/actions/actionStyles.ts @@ -4,7 +4,7 @@ import { redrawTextBoundingBox, } from "../element"; import { KEYS } from "../keys"; -import { DEFAULT_FONT } from "../appState"; +import { DEFAULT_FONT, DEFAULT_TEXT_ALIGN } from "../appState"; import { register } from "./register"; import { mutateElement, newElementWith } from "../element/mutateElement"; @@ -48,6 +48,7 @@ export const actionPasteStyles = register({ if (isTextElement(newElement)) { mutateElement(newElement, { font: pastedElement?.font || DEFAULT_FONT, + textAlign: pastedElement?.textAlign || DEFAULT_TEXT_ALIGN, }); redrawTextBoundingBox(newElement); }