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 inside Element #345

Open
leonardorame opened this issue Jul 16, 2022 · 1 comment
Open

Canvas inside Element #345

leonardorame opened this issue Jul 16, 2022 · 1 comment

Comments

@leonardorame
Copy link

Hi, I need to add a Canvas inside an element, and set its width and height to fit the parent (without that the images I need to draw on the canvas are stretched).

So far I did this:

row [ Element.width fill, Element.height fill, Border.color color.black]
[ borderColumn [ Element.html (canvas [] []) ]
]
@tankorsmash
Copy link

Did you get this working? I have a similar issue with nesting SVGs inside elm-ui, which ends up being the same issue I think, where the Element can't really tell what the canvas size should be, so you'd need to hardcode the size, wouldn't you?

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