开发者

DOM library for <canvas>

开发者 https://www.devze.com 2023-03-01 06:20 出处:网络
I understand the differences between <canvas> and SVG, and the pros and cons of both. I\'m creating a hierarchical diagram, whose nodes and connections a user can manipulate through event handli

I understand the differences between <canvas> and SVG, and the pros and cons of both. I'm creating a hierarchical diagram, whose nodes and connections a user can manipulate through event handling. The clear winner would normally be SVG, as there's a true DOM I can use.

However, I've heard claims that <canvas> is a contender开发者_C百科 for such an application with the proper scene graph (DOM) library. I can't find consensus on what the go-to scene graph library for <canvas> is (for SVG, it's Raphael). Can someone point me in the right direction, or are these libraries too immature to supersede SVG for complex DOM manipulation?


Cake (old page) is a library for that. I've used it and it worked quite well.


Sounds like you might like to check out d3.js (still SVG-based, but does allow large datasets and has good performance).

0

精彩评论

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