使用JavaScript绘制带有可点击点的线条(Drawing lines with clickable points using JavaScript)

编程入门 行业动态 更新时间:2024-10-23 21:25:46
使用JavaScript绘制带有可点击点的线条(Drawing lines with clickable points using JavaScript)

我有兴趣使用JavaScript做一些绘图。 我会直接举个例子:

替代文字http://img693.imageshack.us/img693/3774/linep.png绿色水平线是静态的,所有的垂直线都是可点击的。 点击行的例子是红色的。

我见过很多API,但它们都比我需要更多的复杂性,使其变得比必要更复杂。

任何建议的良好API? 自己做?

I'm interested in doing some drawing using JavaScript. I'll get straight to an example:

alt text http://img693.imageshack.us/img693/3774/linep.png The green horizontal line would be static, and all the vertical lines would be clickable. An example of a clicked line would be the red one.

I've seen many API's, but they all allow more complexity than I need, making it more complicated than necessary.

Any suggestion for a good API? Make it oneself?

最满意答案

您可以使用CSS和html来最初组成线。 然后将这些转移到JS中。 从你所描述的来看,从头开始看起来并不难。

可能还有别的东西你没有提到!

You could use CSS and html to make up the lines initially. Then transfer some of this into the JS. To me from what you have described it doesn't look that difficult to do from scratch.

There's probably something else you haven't mentioned though!

更多推荐

本文发布于:2023-08-07 01:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458911.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:线条   Drawing   JavaScript   points   clickable

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!