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

Canvas.setDimensions accepts only numeric height/width #261

Open
ittaysw opened this issue Jan 29, 2025 · 2 comments
Open

Canvas.setDimensions accepts only numeric height/width #261

ittaysw opened this issue Jan 29, 2025 · 2 comments

Comments

@ittaysw
Copy link

ittaysw commented Jan 29, 2025

The method checks if the values are a number. It then sets a csss and calls's rapael's setSize which sets height/width attributes. All of these accept non numeric values like '100%', '100px', etc. It would be nice if setDimension supports these. This just means not doing the checks.

@ittayd
Copy link

ittayd commented Jan 29, 2025

Also, note that in Canvas.init there's also a check for width and height in the form of !isNaN(parseFloat(width)) this check will pass if width is '100%' since parseFloat will return 100 which is a number. However, the intent is not for a 100 width canvas.

@freegroup
Copy link
Owner

I need absolute values. By using 100% scrolling of the canvas is not possible...in all cases

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

3 participants