葡萄游戏厅—葡萄游戏厅官网网站

Github Network Graph使用Canvas替代Flash葡萄游戏厅官网网站

澳门葡京官网2020-04-07 15:40

葡萄游戏厅官网网站 1

Github的共同创始人,Tom Preston-Werner在博文中写道:Github的network graph使用Canvas替代了Flash技术。

这并不是第一个迁移至Canvas的网站,但是Tom解释了他之所以这样做的原因:

Canvas/JavaScript优于Flash之处:

Fewer lines of code and smaller deliverable size: Smaller code baseand the compiled SWF file clocks in at 111k compared to the minifiedCanvas version at just 25k!Flash works badly on Linux (and friends)Inspectable/debuggable via browserNo compilation stepBetter cursor handlingNo need to focus to receive keyboard events

Canvas/JavaScript不如Flash之处:

Have to handle clipping and redraw manually (SVG does better here too)No embedded font supportNo built-in multiline text wrap (painful for Bespin! ;)No HTML fragment rendering. Yes! drawElement, drawElement, drawElement. Please user agents!点击查看详情: