bga-cards
    Preparing search index...

    Interface ScrollableStockSettings<T>

    interface ScrollableStockSettings<T> {
        autoPlace?: (card: T) => boolean;
        buttonGap?: string;
        cardClickEventFilter?: CardClickEventFilter;
        center?: boolean;
        counter?: CardCounterSettings;
        gap?: string;
        lastPlayedCardStyle?: SelectionStyle;
        leftButton: ScrollableStockButtonSettings;
        rightButton: ScrollableStockButtonSettings;
        scrollbarVisible?: boolean;
        scrollStep?: number;
        selectableCardStyle?: SelectionStyle;
        selectedCardStyle?: SelectionStyle;
        sort?: SortFunction<T>;
        unselectableCardStyle?: SelectionStyle;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    autoPlace?: (card: T) => boolean

    Say if a given card should be placed on this stock, based on card properties. For example, every card with location === 'hand' and location_arg == this.player_id should go to the current player hand. If unset, all cards on this stock must be added manually on this stock.

    Type declaration

      • (card: T): boolean
      • Parameters

        • card: T

          the card to place on a stock

        Returns boolean

        true if the card should be placed on this stock.

    buttonGap?: string

    CSS to set the gap between the buttons and the card container. '0' if unset.

    cardClickEventFilter?: CardClickEventFilter

    The filter on card click event. Use setting from manager is unset.

    center?: boolean

    indicate if the line should be centered (default yes)

    Show a card counter on the stock. Not visible if unset.

    gap?: string

    CSS to set the gap between cards. '8px' if unset.

    lastPlayedCardStyle?: SelectionStyle

    The style to apply to the last played card. Default to class 'bga-cards_last-played-card'.

    Setting for the left button

    Setting for the right button

    scrollbarVisible?: boolean

    indicate if the scrollbar is visible (default true)

    scrollStep?: number

    indicate the scroll (in px) when clicking the buttons

    selectableCardStyle?: SelectionStyle

    The style to apply to selectable cards. Use style from manager is unset.

    selectedCardStyle?: SelectionStyle

    The style to apply to selected cards. Use style from manager is unset.

    sort?: SortFunction<T>

    Indicate the card sorting (unset means no sorting, new cards will be added at the end). For example, use sort: sortFunction('type', '-type_arg') to sort by type then type_arg (in reversed order if prefixed with -). Be sure you typed the values correctly! Else '11' will be before '2'.

    unselectableCardStyle?: SelectionStyle

    The style to apply to selectable cards. Use style from manager is unset.