4 ms·
I'm surprised he didn't use SVG - it provides an object graph, and will handle clipping/rendering for you. A low level API like canvas probably isn't necessary
by jomohke 17y ago
I'm surprised he didn't use SVG - it provides an object graph, and will handle clipping/rendering for you.
A low level API like canvas probably isn't necessary for this kind of work.
- mr_justin 17y agoDoes it handle click/drag events? If you check out the network graph of repo with a lot of commiters/activity, you can click and drag the graph around. It works fantastic with canvas/javascript. Example: http://github.com/madrobby/scriptaculous/network http://github.com/madrobby/scriptaculous/network
- mbrubeck 17y agoMouse interaction is quite easy with SVG; you can attach event listeners to individual SVG elements in the DOM.
- andrewvc 17y agoI wonder if the fonts would look better with SVG, as is, the branch names look terrible on canvas.
- vidarh 17y agoI agree with you, though the upside of canvas is that it's easier to get it working on IE (via excanvas)
- jparise 17y agoAccording to http://github.com/blog/621-bye-bye-flash-network-graph-is-now-canvas#comment_6954 http://github.com/blog/621-bye-bye-flash-network-graph-is-no..., there are too many DOM objects involved in the graph for SVG to be performant.