vishanurag / Canvas-Editor

This is a simple web project that is made with an aim to learn about canvas element of html. Now, this project is open to all of the amazing contributors.
https://vishanurag.github.io/Canvas-Editor/
MIT License
12 stars 24 forks source link

Font Size Mismatch in Canvas Text Update #33

Open ananyag309 opened 8 hours ago

ananyag309 commented 8 hours ago

The global fontSize variable and the textSize input value are not synchronized properly, leading to inconsistencies when updating the canvas. Although the font size changes in the UI, the fontSize variable is not updated correctly, which can cause the canvas to display the text with an outdated or incorrect size.

Expected Behavior: When a new font size is selected, the text on the canvas should immediately reflect the updated size.

Solution: Update the global fontSize variable in the textSize input event listener before calling the updateCanvas function to ensure the selected font size is applied correctly.

please assign this issue to me under gssoc and hacktober fest