Class: Title

Title(parentDiv, hSize, text, doAlignCenteropt)

Heading element used as a section title.

Constructor

new Title(parentDiv, hSize, text, doAlignCenteropt)

Creates a new Title instance.

Parameters:
Name Type Attributes Default Description
parentDiv p5.Element

The parent element to attach the title to.

hSize number

The heading size (1-6).

text string

The text content of the title.

doAlignCenter boolean <optional>
false

Whether to center the title text.

Source:

Extends

Methods

hide()

Hides this field by setting its display to 'none'.

Overrides:
Source:

isHidden() → {boolean}

Checks if this field is currently hidden.

Overrides:
Source:
Returns:

True if the field is hidden, false otherwise.

Type
boolean

setText(text)

Sets the text content of this field.

Parameters:
Name Type Description
text string

The new text content for the field.

Overrides:
Source:

setTooltip(tooltip)

Sets the tooltip text for this field.

Parameters:
Name Type Description
tooltip string

The tooltip text to set.

Overrides:
Source:

show()

Shows this field by setting its display to '' (default).

Overrides:
Source: