meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
http://camanjs.com
BSD 3-Clause "New" or "Revised" License
3.55k stars 404 forks source link

Accept pure DOM object instead of id as the second parameter #39

Closed bebraw closed 12 years ago

bebraw commented 12 years ago

I ran into this need while developing a little application. I have a reference to a DOM Canvas and I actually have to inject an artificial id for it in order to make it work with Caman. This is sort of nasty.

Do you think it would be acceptable if Caman object accepted DOM object as its second parameter in addition to ids?

meltingice commented 12 years ago

Caman should be able to accept DOM objects now without a problem. Do you have the latest version? I would recommend just using the code in the master branch.

bebraw commented 12 years ago

Excellent. Will do. :)

Just using the latest stable. Somehow managed to overlook that. It might be cool if you could mention about this possibility at docs.

meltingice commented 12 years ago

Good call, the docs definitely need an overhaul sometime soon.

Ryan LeFevre (@meltingice) LayerVault Software Engineer

On Tuesday, September 18, 2012 at 10:26 AM, Juho Vepsäläinen wrote:

Excellent. Will do. :) Just using the latest stable. Somehow managed to overlook that. It might be cool if you could mention about this possibility at docs (http://camanjs.com/docs).

— Reply to this email directly or view it on GitHub (https://github.com/meltingice/CamanJS/issues/39#issuecomment-8656527).