Class: DeckLabel

DeckLabel(owner, optionsopt)

Represents a label for a deck of cards.

Constructor

new DeckLabel(owner, optionsopt)

Creates a new DeckLabel instance.
Parameters:
Name Type Attributes Description
owner Object The deck this label belongs to.
options Object <optional>
Options for initializing the label.
Properties
Name Type Attributes Default Description
text string <optional>
'' The text content of the label.
sticky string <optional>
'bottom' The alignment of the label relative to the deck ('top', 'bottom', 'left', 'right').
visible boolean <optional>
true Whether the label is initially visible.
Source:

Extends

  • HTMLDivElement

Methods

render(optionsopt)

Updates the label's position, text, and visibility.
Parameters:
Name Type Attributes Description
options Object <optional>
Options for updating the label.
Properties
Name Type Attributes Default Description
text string | null <optional>
null The new text for the label (if any).
sticky string | null <optional>
null The new alignment for the label ('top', 'bottom', 'left', 'right').
visible boolean <optional>
true Whether the label should be visible.
speed number <optional>
this.owner.animationSpeed The animation speed for the label's position transition.
posX number <optional>
this.x The X-coordinate for the label's position.
posY number <optional>
this.y The Y-coordinate for the label's position.
paddingX number <optional>
10 Horizontal padding around the label.
paddingY number <optional>
10 Vertical padding around the label.
Source: