# CanvasSpot
Canvas spots are elements drawn on top of the canvas. They can be used to represent anything you might need but the most common use case of canvas spots is rendering information and managing components rendered in the canvas. Read here for more information about Canvas Spots (opens new window)
# Properties
id
String (opens new window) Spot ID.type
String (opens new window) Spot type.component
Component? Component to which the spot will be attached.componentView
ComponentView? ComponentView to which the spot will be attached.boxRect
Object (opens new window)? Fixed box rect of the spot, eg.{ width: 100, height: 100, x: 0, y: 0 }
.
# getBoxRect
Get the box rect of the spot.
# Parameters
opts
Object (opens new window) (optional, default{}
)
# Examples
canvasSpot.getBoxRect();
// { width: 100, height: 50, x: 0, y: 0 }
Returns Object (opens new window) The box rect object
# getStyle
Get the style object of the spot.
# Parameters
opts
Object (opens new window) (optional, default{}
)
# Examples
canvasSpot.getStyle();
// { width: '100px', height: '...', ... }
Returns CSSStyleDeclaration [opts]
# isType
Check the spot type.
# Parameters
# Examples
canvasSpot.isType('select');
Returns Boolean (opens new window)