HTML5 Canvas +在JS库中选择/拖放功能? [英] HTML5 Canvas + select / drag-and-drop features in a JS lib?

查看:307
本文介绍了HTML5 Canvas +在JS库中选择/拖放功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用HTML5 Canvas,但是我想在形状,文本和曲线方面使用它,能够附加传统的DOM事件,如onClick或拖放功能。有没有任何Javascript库能够做到这一点吗?我已经看到gwt-canvas接近这种方法,但是没有看到它的细节。

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.

谢谢,
Istvan

Thanks, Istvan

推荐答案

我不太了解js字段,但我倾向于推荐 http://processingjs.org/但是,请注意,这是一个Java库实现在javascript。

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.

我认为这可能有助于澄清您是否需要将事件(onClick等)附加到特定的绘制对象(形状,文本,曲线,etc ...)或者你只需​​要将事件附加到canvas区域本身。

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将与Google Web Toolkit意思是它根本不是一个javascript库(AFAIK,有人请纠正我,如果我错了)。

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).

这篇关于HTML5 Canvas +在JS库中选择/拖放功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆