Skip to main content

Home > @jsplumbtoolkit/browser-ui-plugin-background

browser-ui-plugin-background package

Classes

ClassDescription
BackgroundPluginOffers a means to manage backgrounds for a Surface.
GeneratedGridBackground

A background that generates an SVG grid based upon the current content bounds, ensuring that there is always a grid visible underneath the content. The grid may consist of lines or dots - control this via the gridType option.

The size of the grid can be mandated in the options for the background, or it can be extracted from the surface.

You can hide/show the background grid via the hide(), show(), toggle() or setVisible(boolean) methods.

SimpleBackgroundA background consisting of a single image.
TiledBackground

Enumerations

EnumerationDescription
BackgroundTypesAvailable background types. 'simple' is a single image. 'tiled' allows you to serve the image in tiles.
GridTypes
TilingStrategies

Defines how the tiles are arranged.

With logarithmic each layer is assumed to have a maximum of (2^level+1) tiles in each axis (for instance at level 0, 2 tiles). This setup is how apps like Google maps arrange their tiles.

With absolute tiling, the number of tiles in each axis is computed as the size of the image in that axis divided by the tile size in that axis. Thus, for each zoom level, there are the same number of tiles.

Interfaces

InterfaceDescription
BackgroundOptionsBase options for background
GeneratedGridBackgroundOptionsOptions for the generated grid background. This background is still in beta as of 5.10.6.
ImageBackgroundOptionsOptions for an image background
TiledBackgroundOptions

Variables

VariableDescription
CLASS_BACKGROUND_BORDERthe css class that will be added to a grid background's border
CLASS_BACKGROUND_GRID_DOT_MAJORThe class that will be added to the dots representing grid lines (when gridType is GridTypes.dotted)
CLASS_BACKGROUND_GRID_DOT_MINORThe class that will be added to the dots representing grid tick marks (when gridType is GridTypes.dotted)
CLASS_BACKGROUND_GRID_MAJORThe class that will be added to the lines representing grid lines (when gridType is GridTypes.lines)
CLASS_BACKGROUND_GRID_MINORThe class that will be added to the lines representing grid tick marks (when gridType is GridTypes.lines)
CLASS_BACKGROUND_GRIDthe css class that will be added to the major and minor dots/lines in a grid
CLASS_BACKGROUNDThe css class that will be added to a grid background's main element

Type Aliases

Type AliasDescription
BackgroundTypeType of a background - the values from the BackgroundTypes enum.
GridType
OnBackgroundReadyCallbackCallback from the SimpleBackground when the background image has loaded.
TileSpecs
TilingStrategyTiling strategy - the values from the TilingStrategies enum