Class: MathModel

MathModel()

Class representing a MathCell graphic.

Constructor

new MathModel()

Source:

Members

canvas :Canvas

The Canvas object on which we will draw our graphics
Type:
Source:

config :renderConfig

A MathCell rendering configuration
Type:
Source:

inputs :inputConfigSet

A hierarchical array of input configurations
Type:
Source:

Methods

add(…objs)

Add some geometry to the current drawing
Parameters:
Name Type Attributes Description
objs Array.<Geometry> <repeatable>
Source:

beforeUpdate(params)

If a subclass overrides beforeUpdate(), and it returns a truthy value, then the canvas' screen will be cleared before attempting to redraw the content. If beforeUpdate() returns a falsy value, the content redraw will happen synchronously instead.
Parameters:
Name Type Description
params Object the parameter values from our configured inputs
Source:

configure(config)

Modify the rendering configuration
Parameters:
Name Type Description
config renderConfig the parameters to be updated
Source:

run(element)

Build an interactive Math Cell in a DOM Element.
Parameters:
Name Type Description
element HTMLElement | string A DOM Element, or the id of one.
Source:

update(params)

Parameters:
Name Type Description
params Object the parameter values from our configured inputs
Source:

(static) loadMathCells(classMap, document)

Attempt to load all mathcells in a document
Parameters:
Name Type Description
classMap Object an object which maps id's to Classes
document Document a DOM document (defaults to window.document)
Source: