feat/ability to change the alignment of the text (#1213)
* feat: add the ability to change the alignement of the text * test: update the snapshots to included the newely textAlign state * style: use explicit key assignment to object * test: add missing new key textAlign to newElement.test.ts * style: make the text on the buttons start with uppercase * Update src/locales/en.json * add types * add migration * remove incorrect update Co-authored-by: Youness Fkhach <younessfkhach@porotonmail.com> Co-authored-by: Lipis <lipiridis@gmail.com> Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -3,6 +3,7 @@ import { getDateTime } from "./utils";
|
||||
import { t } from "./i18n";
|
||||
|
||||
export const DEFAULT_FONT = "20px Virgil";
|
||||
export const DEFAULT_TEXT_ALIGN = "left";
|
||||
|
||||
export function getDefaultAppState(): AppState {
|
||||
return {
|
||||
@ -22,6 +23,7 @@ export function getDefaultAppState(): AppState {
|
||||
currentItemRoughness: 1,
|
||||
currentItemOpacity: 100,
|
||||
currentItemFont: DEFAULT_FONT,
|
||||
currentItemTextAlign: DEFAULT_TEXT_ALIGN,
|
||||
viewBackgroundColor: "#ffffff",
|
||||
scrollX: 0 as FlooredNumber,
|
||||
scrollY: 0 as FlooredNumber,
|
||||
@ -77,6 +79,7 @@ export function clearAppStatePropertiesForHistory(
|
||||
currentItemRoughness: appState.currentItemRoughness,
|
||||
currentItemOpacity: appState.currentItemOpacity,
|
||||
currentItemFont: appState.currentItemFont,
|
||||
currentItemTextAlign: appState.currentItemTextAlign,
|
||||
viewBackgroundColor: appState.viewBackgroundColor,
|
||||
name: appState.name,
|
||||
};
|
||||
|
Reference in New Issue
Block a user