Class: DiagramPainter

algeobraCanvas~DiagramPainter(scene, diagram, options)

Handles painting and updating a diagram Additionally this can handle resizing the output based on some element

Constructor

new DiagramPainter(scene, diagram, options)

Parameters:
Name Type Description
scene GeometryScene
diagram DiagramCanvas
options Object
Properties
Name Type Description
bg Object The background configuration
autoResize Object
Properties
Name Type Attributes Default Description
target Element | SVGElement The target which the canvas size should be adjusted to
minWidth Number <optional>
1 The minimum width that will be preserved
widthFactor Number <optional>
0.9 The percentage of the container that the canvas should occupy
keepAspect Boolean <optional>
false If true, the autoresize will keep the previous aspect ratio, if false not
Source: