Methods
_configureOptions(options)
Configures the supplied options on this instance of CardKit
- Source:
Parameters:
Name | Type | Description |
---|---|---|
options |
object
|
The options to configure |
_isValidConfiguration(configuration) → {boolean}
Validates the provided configuration object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
configuration |
object
|
The configuration object to validate |
Returns:
- Type:
-
boolean
Is the configuration object valid
_isValidLayoutsConfiguration(configuration) → {boolean}
Validates the provided layouts configuration object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
configuration |
object
|
The layouts configuration object to validate |
Returns:
- Type:
-
boolean
Is the layouts configuration object valid
_isValidRenderer(renderer) → {boolean}
Validates the supplied renderer
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderer |
object
|
The renderer to validate |
Returns:
- Type:
-
boolean
If the renderer is valid
_isValidTemplatesConfiguration(configuration) → {boolean}
Validates the provided templates configuration object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
configuration |
object
|
The templates configuration object to validate |
Returns:
- Type:
-
boolean
Is the templates configuration object valid
_isValidThemesConfiguration(configuration) → {boolean}
Validates the provided themes configuration object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
configuration |
object
|
The themes configuration object to validate |
Returns:
- Type:
-
boolean
Is the themes configuration object valid
addRenderer(renderer)
Add a renderer
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderer |
object
|
A renderer to add |
computeConfiguration(options) → {object}
Compute the configuration
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
options |
object
|
null | Any options (e.g. a specific theme and / or layout) to use when computing the configuration |
Returns:
- Type:
-
object
The computed configuration
getRenderers() → {array}
Get the renderers
- Source:
Returns:
- Type:
-
array
The configured renderers
updateConfiguration(configuration, options, rerender)
Updates the configuration, and optionally rerenders the image (if previously rendered)
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
configuration |
object
|
The configuration object to update to | |
options |
object
|
Any options to supply (templates, themes, layouts) | |
rerender |
boolean
|
true | Whether or not to attempt to rerender the image |