Class: Canvas

Canvas(gridmodel, property, height, width, scale)

Canvas is a wrapper-class for a HTML-canvas element. It is linked to a @Gridmodel object, and stores what from that @Gridmodel should be displayed (width, height, property, scale, etc.)

Constructor

new Canvas(gridmodel, property, height, width, scale)

The constructor function for a @Canvas object.
Parameters:
Name Type Description
gridmodel Gridmodel The gridmodel to which this canvas belongs
property string the property that should be shown on the canvas
height int height of the canvas (in rows)
width int width of the canvas (in cols)
scale scale of the canvas (width/height of each gridpoint in pixels)
Source:

Methods

displaygrid()

Draw the state of the Gridmodel (for a specific property) onto the HTML element
Source:

displaygrid_dots()

Draw the state of the Gridmodel (for a specific property) onto the HTML element
Source: