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 support? #78

Closed
empath opened this issue Jan 3, 2018 · 8 comments
Closed

Canvas support? #78

empath opened this issue Jan 3, 2018 · 8 comments

Comments

@empath
Copy link

empath commented Jan 3, 2018

I was thinking of rewriting this: http://debug.elm-lang.org/edit/Mario.elm and realized there's no way to update a canvas, afaik. This is probably a far-off feature request, but I think it would be a fun one to add, and something that elm supports, so not outside the scope of the project, I would think?

@wldcordeiro
Copy link
Contributor

@empath I think you'd likely want to add a service of some sort to get the bridge for canvas support.

@keeslinp
Copy link

keeslinp commented Jan 8, 2018

If someone is wanting to implement this, I would suggest adding it as a feature to stdweb and then making a service wrapper here. This library already depends on stdweb so it might make sense to add it there.

@karuna karuna mentioned this issue Feb 14, 2018
@keeslinp
Copy link

Looks like someone already went ahead and added it to stdweb. koute/stdweb#80. It shouldn't be too hard to add here now.

@Boscop
Copy link

Boscop commented May 4, 2018

@keeslinp I want to use the canvas fill_rect function from stdweb on a canvas element in a yew app, how can I do that? :)
I'm interested in contributing to expand the canvas API coverage in stdweb/yew.

@Kwarrtz
Copy link

Kwarrtz commented Jun 8, 2018

Now that stdweb has canvas support, is there any progress on adding support to Yew?

@LifeIsStrange
Copy link

Why a canvas tag in yew does not compile ?
From my naive understanding, yew should support all html tags out of the box without doing any special work ?

Secondly, for using the canvas api, does yew let me use stdweb out of the box ? which would allow to use the canvas api.
If so, the issue should be trivial to fix.

@totorigolo
Copy link
Contributor

I don't have time to elaborate or look at this issue in details right now, but I used a canvas with yew recently: https://github.com/totorigolo/pathbot/blob/87df913bbee5906cb2ccc9e0387f9f14630a5386/src/lib.rs#L599

Hope this helps :)

@jstarry
Copy link
Member

jstarry commented Sep 27, 2019

I think this is no longer an issue, if not, please re-open!

@jstarry jstarry closed this as completed Sep 27, 2019
teymour-aldridge referenced this issue in teymour-aldridge/yew Jul 8, 2020
* Enable doc tests

* Clean up Cargo.toml

* Fix doc test
jstarry added a commit to jstarry/yew that referenced this issue Jul 9, 2020
* Enable doc tests

* Clean up Cargo.toml

* Fix doc test
jstarry added a commit that referenced this issue Jul 9, 2020
* Enable doc tests

* Clean up Cargo.toml

* Fix doc test
jstarry added a commit that referenced this issue Aug 16, 2020
* Enable doc tests

* Clean up Cargo.toml

* Fix doc test
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

8 participants