bga-cards
    Preparing search index...

    Interface HandStockSettings<T>

    interface HandStockSettings<T> {
        autoPlace?: (card: T) => boolean;
        cardClickEventFilter?: CardClickEventFilter;
        cardOverlap?: number;
        counter?: CardCounterSettings;
        emptyHandMessage?: string;
        fanShaped?: boolean;
        floatLeftMargin?: number;
        floatRightMargin?: number;
        floatZIndex?: number;
        lastPlayedCardStyle?: SelectionStyle;
        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.

    cardClickEventFilter?: CardClickEventFilter

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

    cardOverlap?: number

    Card overlap, % of the card width. Default 25.

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

    emptyHandMessage?: string

    Message to display if the hand is empty. Default null.

    fanShaped?: boolean

    If the cards should be fan-shaped. Default true.

    floatLeftMargin?: number

    A margin to add to the left of the floating hand, for example if you have a help button floating on the bottom left corner of the screen.

    floatRightMargin?: number

    A margin to add to the right of the floating hand.

    floatZIndex?: number

    A z-index to add to the floating hand.

    lastPlayedCardStyle?: SelectionStyle

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

    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.