Protected autoProtected autoProtected cardProtected cardsProtected elementthe stock element (should be an empty HTML Element)
Protected Optional fakeProtected managerthe card manager
Optional onCalled when selection change. Returns the clicked card.
card: the clicked card (can be selected or unselected)
Called when selection change. Returns the clicked card.
card: the clicked card (can be selected or unselected)
Optional onCalled when selection change. Returns the selection.
selection: the selected cards of the stock
lastChange: the last change on selection card (can be selected or unselected)
Protected selectedProtected selectionProtected Optional sortProtected thicknessesAdd a card to the stock.
the card to add
Optional animation: CardAnimation<T>a CardAnimation object
Optional settings: AddCardToDeckSettingsa AddCardSettings object
the promise when the animation is done (true if it was animated, false if it wasn't)
Protected addOptional settings: AddCardSettingsAdd an array of cards to the stock.
the cards to add
Optional animation: CardAnimation<T>a CardAnimation object
Optional settings: AddCardSettingsa AddCardSettings object
if number, the number of milliseconds between each card. if true, chain animations
Protected animationThe element to animate. The element is added to the destination stock before the animation starts.
Protected bindProtected canChecks if the card can be added. By default, only if it isn't already present in the stock.
the card to add
Optional settings: AddCardSettingsthe addCard settings
if the card can be added
Protected cardNotify the stock that a card is removed.
the card to remove
Optional settings: RemoveCardFromDeckSettingsa RemoveCardSettings object
a card
if the card is present in the stock
Protected createOptional counterId: stringFlips the card.
the card informations
Optional settings: FlipCardSettingsa card in the stock
the HTML element generated for the card
Protected getProtected getthe selected cards
Protected moveOptional settings: AddCardSettingsProtected moveOptional settings: AddCardSettingsRemove all cards from the stock.
Optional settings: RemoveCardFromDeckSettingsa RemoveCardSettings object
Remove a card from the stock.
the card to remove
Optional settings: RemoveCardSettingsa RemoveCardSettings object
Remove a set of card from the stock.
the cards to remove
Optional settings: RemoveCardSettingsa RemoveCardSettings object
Set selected state to a card.
the card to select
Set the the cards number.
the cards number
the deck top card. If unset, will generated a fake card (default). Set it to null to not generate a new topCard.
Set the card to its front (visible) or back (not visible) side.
the card informations
Optional settings: FlipCardSettingsProtected setSet the selectable class for each card.
Optional selectableCards: T[]the selectable cards. If unset, all cards are marked selectable. Default unset.
Set if the stock is selectable, and if yes if it can be multiple. If set to 'none', it will unselect all selected cards.
the selection mode
Optional selectableCards: T[]the selectable cards (all if unset). Calls setSelectableCards method
Shows a shuffle animation on the deck
Optional settings: ShuffleAnimationSettings<T>promise when animation ends
Set unselected state to a card.
the card to unselect
Generated using TypeDoc
Abstract stock to represent a deck. (pile of cards, with a fake 3d effect of thickness). * Needs cardWidth and cardHeight to be set in the card manager.