A RavelCanvas combines a ravel with code to render the ravel to an
HTML canvas element. It subclasses Module.Ravel.
- Usage:
var ravel=new Module.RavelCanvas
- Methods:
-
- render()
- render the Ravel to the canvas element
- setCanvas(canvas)
- canvas is the canvas context of an actual DOM object, as returned
by
document.getElementById().getContext('2d')
or similar.
- handleLeftKey()
- called to adjust the slicer towards the origin
on the handle the mouse is currently hovering over
- handleRightKey()
- called to adjust the slicer away from the origin
on the handle the mouse is currently hovering over
- onMouseLeave()
- handle mouse leave events
The key handling methods are in this class, because Module.Ravel has
no concept of a selected handle.
Ravelation Pty Ldt