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

Issue with HTML5 Canvas Code #8

Closed
Hakim-CS opened this issue Feb 22, 2024 · 2 comments
Closed

Issue with HTML5 Canvas Code #8

Hakim-CS opened this issue Feb 22, 2024 · 2 comments

Comments

@Hakim-CS
Copy link

Description:
The provided HTML code contains examples of various shapes drawn using HTML5 Canvas. While the code demonstrates how to draw text, lines, rectangles, and circles on a canvas, there are several issues and improvements that can be addressed:

Inconsistent Naming: The canvas elements are named inconsistently (e.g., "text", "line", "rectangle", "rect", "circle"). Consistent naming conventions should be used to improve readability and maintainability.

Canvas Size: The canvas element for the "line" shape has its height set to 0, which results in a line not being visible. The canvas size should be adjusted to display the line properly.

Error Handling: The canvas elements for "rectangle" and "circle" have fallback text ("This browser does not support Canvas!"), but no such fallback is provided for the "text" and "line" elements. Consistent error handling should be implemented for all canvas elements.

@learning-zone
Copy link
Owner

I would prefer new PR instead. Thanks

@learning-zone learning-zone closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
@Hakim-CS
Copy link
Author

thanks a lot .

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

No branches or pull requests

2 participants