CardKitDOM

CardKitDOM

Additional CardKit class used for rendering in the DOM

Constructor

new CardKitDOM()

Source:

Methods

_isValidElement(id) → {boolean}

Checks if the ID provided is valid
Source:
Parameters:
Name Type Description
id string The ID to validate
Returns:
Type:
boolean
If the ID was valid

download(scale, element)

Downloads the card as an image in the browser
Source:
Parameters:
Name Type Default Description
scale number 2 The scale to output at
element object The element to use to generate the image

renderCard(id, options)

Renders just the Card as a React component to the supplied element
Source:
Parameters:
Name Type Description
id string The ID of the element to render the card into
options object Any override data (e.g. theme, layout) to use when rendering the card

renderUI(id)

Renders the built-in UI to the supplied element
Source:
Parameters:
Name Type Description
id string The ID of the element to render the UI into

rerender()

Re-renders the Card or UI
Source:

CardKitDOM

new CardKitDOM(cardkit)

Constructor takes in an instance of CardKit and stores it for later use
Source:
Parameters:
Name Type Description
cardkit CardKit An instance of CardKit

Methods

_isValidElement(id) → {boolean}

Checks if the ID provided is valid
Source:
Parameters:
Name Type Description
id string The ID to validate
Returns:
Type:
boolean
If the ID was valid

download(scale, element)

Downloads the card as an image in the browser
Source:
Parameters:
Name Type Default Description
scale number 2 The scale to output at
element object The element to use to generate the image

renderCard(id, options)

Renders just the Card as a React component to the supplied element
Source:
Parameters:
Name Type Description
id string The ID of the element to render the card into
options object Any override data (e.g. theme, layout) to use when rendering the card

renderUI(id)

Renders the built-in UI to the supplied element
Source:
Parameters:
Name Type Description
id string The ID of the element to render the UI into

rerender()

Re-renders the Card or UI
Source: