Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support decreasing/increasing fontSize via keyboard #4553

Merged
merged 15 commits into from
Jan 12, 2022

Conversation

dwelle
Copy link
Member

@dwelle dwelle commented Jan 8, 2022

Not sure what fontSize steps we should use:

  • relative steps (what I'm doing currently)
  • absolute steps

Also:

  • Now correctly offsetting the element position based on textAlign when changing fontSize via property panel
  • Added a couple (un)related refactor commits.

Todos (future)

  • history entry pushed on every increase/decrease. We'd probably need to add support for history merging to fix this.
  • add support for increasing/decreasing within wysiwyg

(reviewable by commits not much anymore)

@dwelle dwelle requested a review from ad1992 January 8, 2022 11:19
@vercel
Copy link

vercel bot commented Jan 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/excalidraw/excalidraw/7grHRniZ3ZUMvM1GWcF9A73ARRDt
✅ Preview: https://excalidraw-git-fontsizeshortcuts-excalidraw.vercel.app

return null;
};

export const getContainerElement = (
Copy link
Member

@ad1992 ad1992 Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have getBoundTextElement which returns the bound text
EDIT: Ignore my bad thats for bound text and this is for container

Copy link
Member

@ad1992 ad1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@dwelle dwelle merged commit a51ed9c into master Jan 12, 2022
@dwelle dwelle deleted the font_size_shortcuts branch January 12, 2022 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants