On Mar 18, 2015, at 10:33 AM, Richard Hipp <d...@sqlite.org> wrote:
> For all its faults, the current timeline mechanism works with a single
> HTTP request, has all content in a single HTML file, and is computed
> quickly and efficiently on the server side.

SVG and Canvas would do that, too, and probably in less code than required by 
the current <div> hackery.

> Can events be added to a <canvas>
> that fire when a click occurs on a specific element?

Building interactive graphics with raw canvas elements is a fair bit of work, 
but doable.  Basically you have to work out what was clicked given a raw 
coordinate value, which means you have to remember where on the canvas you drew 
each box.

Or, you can just use a scene graph library like EaselJS, which provides things 
like the Shape class, which can receive click events:

  https://github.com/CreateJS/EaselJS

EaselJS’s API is based on the ActionScript API for Flash, and it’s quite 
powerful.  Current versions of Adobe Flash Professional use EaselJS when 
exporting Flash to HTML5.

Scene graph libraries provide other benefits, such as a hierarchical display 
list instead of a raw array-of-pixels, so that you can let the library worry 
about things like drawing order.
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to