开发者

HTML5 Canvas + select / drag-and-drop features in a JS lib? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. 开发者_JAVA技巧 Closed 10 years ago.

I'd like to use HTML5 Canvas, but I'd like to use it in terms of shapes, texts and curves, able to attach traditional DOM events like onClick or drag-and-drop functions. Is there any Javascript library that is able to do that for me? I've seen that gwt-canvas is close to this approach, but haven't looked it in details.

Thanks, Istvan


Have a look at the crossbrowser framework raphaël (js/svg/vml), this video shows it doing drag&drop / touch-events (try out the actual demo here)


This tutorial might help you. http://html5.litten.com/how-to-drag-and-drop-on-an-html5-canvas/


http://www.html5canvastutorials.com/advanced/html5-canvas-drag-and-drop-tutorial/ this is a really good tutorial on kinetic.js and html5 canvas


I don't know much about the js field, but i'm inclined to recommend http://processingjs.org/ However, do note that it's pretty much a java library implemented in javascript.

I think it might help to clarify your question as to whether you need to attach events (onClick, etc...) to specific drawn objects (shapes, text, curves, etc...) or if you just need to attach the event to the canvas area itself.

BTW, gwt-canvas would be used in conjunction with Google Web Toolkit meaning that it's not really a javascript library at all (AFAIK, someone please correct me if I'm wrong).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜