Home > @jsplumbtoolkit/browser-ui-plugin-background > GeneratedGridBackground
GeneratedGridBackground class
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.
Signature:
export declare class GeneratedGridBackground implements Background
Implements: Background
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(params) | Constructs a new instance of the GeneratedGridBackground class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
_maximumExtentsReached | { minX: number; minY: number; maxX: number; maxY: number; } | ||
_suspended | boolean | ||
autoShrink | boolean | ||
backgroundContainer | SVGElement | ||
currentBounds | ViewportBounds | ||
dotRadius | number | ||
grid | Grid | ||
gridType | GridType | ||
maxHeight | number | ||
maxWidth | number | ||
minHeight | number | ||
minWidth | number | ||
showBorder | boolean | ||
showTickMarks | boolean | ||
surface | Surface | ||
tickDotRadius | number | ||
tickMarksPerCell | number | ||
type | string | ||
type | static | string |
Methods
Method | Modifiers | Description |
---|---|---|
_setVisible(v) | Sets the visible state of the grid | |
destroy() | ||
getHeight() | ||
getWidth() | ||
owns(el) | ||
pan() | ||
setZoom(zoom, doNotDebounce) |