Function: draw()
Draw the given objects on the canvas.
The format of the array of objects must adhere to the description provided in MemoryModel.drawAll.
Param
The array of objects to be drawn: this could be passed as an actual JavaScript array of objects (a single snapshot), or as a JSON file containing the object array. This array of objects may also include the user-defined style configuration. It can also be a list of snapshots, where each snapshot is an array of objects. See the demo files and style.md file for details.
Param
Whether the coordinates (of the objects on the canvas) should be automatically generated or manually inputted.
Param
The configuration (display settings) defined by the user.
This is also the place to define sort_by
("height" or "id") for the object space.
NOTE: In the case that automation == true, then the user must define configuration.width,
as this will be used as the "max canvas width" for the automation process.
If automation == false, then all configuration properties are optional, and the function
will still operate even without defining them.
Call Signature
draw(
objects
,automation
,configuration
):MemoryModel
[]
Parameters
objects
string
| DrawnEntity
[][]
automation
boolean
configuration
Partial
<DisplaySettings
>
Returns
MemoryModel
[]
Defined in
Call Signature
draw(
objects
,automation
,configuration
):MemoryModel
Parameters
objects
string
| DrawnEntity
[]
automation
boolean
configuration
Partial
<DisplaySettings
>
Returns
MemoryModel