Create the Canvas object.
Name | Type | Description |
---|---|---|
viewer |
Viewer |
The viewer |
container |
d3Element |
D3 Element where canvas layers will be added |
options |
Object |
Possible properties: width [Default: 600], height [Default: 600] |
Members
-
cursorString
-
Get or set the cursor style for the mouse when it's on the canvas.
-
heightNumber
-
Get the width of the canvas. Changing this value will not resize the layers. Use resize instead.
-
layerNamesArray
-
Get the names of the layers.
-
layoutLayout
-
Get the layout.
-
pixelRatioNumber
-
Get the pixel ratio for the canvas.
-
sequenceSequence
-
Get the sequence.
-
viewerViewer
-
Get the viewer.
-
widthNumber
-
Get the width of the canvas. Changing this value will not resize the layers. Use resize instead.
Methods
-
Clear the viewer canvas.
Name Type Default Description layerName
String map Name of layer to clear [Default: 'map']. A special value of 'all' will clear all the layers.
-
Resize all layers to a new width and height.
Name Type Description width
Number New width for each layer
height
Number New height for each layer