Skip to main content

Store and Initialization

BuerliData#

initDone#

This will be set after buerliApi.init was called once. If the user code tries to access data/api of buerli and it is not inizialized, an ERROR will be thrown.

options#

The buerli options.

drawing#

The drawing management data structure.

drawing.ids#

The ids of all drawings as array. For easy iteration.

drawing.refs#

The drawing instances hold by a <ID, Instance> record.

drawing.active#

Stores the id of the current drawing.

message#

BuerliOptions#

url#

The url used by buerli-classcad to get a connection to the backend CAD.

elements#

plugins#

globalPlugins#

theme#

The theme settings for the buerli-react components. The theme settings are stored in the buerli state, even they are only needed for UI components.

Parts of this data will be removed in a future release. Should not be used in user code, except in initialization.

theme.primary#

The primary color.

theme.secondary#

The secondary color.

theme.dark#

The dark color.

theme.highlightedGeom#

The color used for highlighted geometry.

theme.hoveredGeom#

The color used for hovered geometry.

config#

Special configuration. gaga

config.geometry#

Can be used to apply special behaviour for the rendering of geometry.

Since geometry config is experimental, it will be changed, removed or replaced in future releases. It should not be used in user code, except in initialization.

BuerliApi#

The buerli api.

init#

This api method initializes state. Considering user can accidentally ommit some important like elements, there is a warning disaplying for these cases.

Params

NameTypeDefaultDescription
optionsPartial<BuerliOptions>options which will be set into state.options

createDrawing#

Params

NameTypeDefaultDescription
namestring

removeDrawing#

Params

NameTypeDefaultDescription
idDrawingID

setActiveDrawing#

Params

NameTypeDefaultDescription
idDrawingID