Methods
calculateYPosition(layers, layer) → {integer}
Calculates the Y position of an element based on any attachments etc.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
layers |
object
|
The object of all layers |
layer |
object
|
The layer to calculate the Y position for |
Returns:
- Type:
-
integer
The Y position
computeFonts(fonts) → {array}
Compute the fonts needed for the card
- Source:
Parameters:
Name | Type | Description |
---|---|---|
fonts |
object
|
The fonts to use when rendering this card |
Returns:
- Type:
-
array
An array of React elements to render in the element of the SVG
computeGradients(layers) → {array}
Compute the gradient elements to render to the element
- Source:
Parameters:
Name | Type | Description |
---|---|---|
layers |
object
|
The configuration object representing the layers that may require gradients |
Returns:
- Type:
-
array
An array of React elements to render to the element
computeLayers(layers) → {array}
Compute the layers to render on the Card
- Source:
Parameters:
Name | Type | Description |
---|---|---|
layers |
object
|
The configuration object representing the layers to render |
Returns:
- Type:
-
array
An array of React elements to render on the card
getLayerValue(layers, layer, key) → {mixed}
Returns the value for a given layer property
- Source:
Parameters:
Name | Type | Description |
---|---|---|
layers |
object
|
The object of all layers |
layer |
object
|
The layer to get the value for |
key |
object
|
The key of the value to get from the layer |
Returns:
- Type:
-
mixed
The value of the property on the layer
render() → {object}
Renders the card
- Source:
Returns:
- Type:
-
object
JSX for the React Component