Members
border :boolean
Whether the cells must be surrounded by a border or not
- boolean
- Source
h :number
Height of cells
- number
- Source
nch :number
Grid rows
- number
- Source
ncw :number
Grid columns
- number
- Source
randomChars :string
A String with the chars to take as source when randomly filling empty cells
- string
- Source
style :module:boxes/BoxBase.BoxBase
The BoxBase
object with visual settings of the text grid
- Source
text :Array.<string>
An array of String objects textning the chars of cells. One string per row, one character of
this string per cell.
- Array.<string>
- Source
w :number
Width of cells
- number
- Source
wild :string
The letter used as wildcardtext
- string
- Source
Methods
countWildChars() → {number}
Counts the number of wildcard characters present in this TextGrid
- Source
- Type:
- number
getAttributes() → {object}
Gets a object with the basic attributes needed to rebuild this instance excluding functions,
parent references, constants and also attributes retaining the default value.
The resulting object is commonly usued to serialize elements in JSON format.
- Source
- The resulting object, with minimal attrributes
- Type:
- object
getNumChars() → {number}
Counts the total number of characters, including wildcard characters.
- Source
- Type:
- number
setAttributes(data) → {module:boxes/TextGridContent.TextGridContent}
Reads the properties of this TextGridContent from a data object
Name | Type | Description |
---|---|---|
data | object | | The data object to be parsed, or just the text content |
- Source
setCharAt(x, y, ch)
Sets the specified character as a content of the cell located at specific coordinates
Name | Type | Description |
---|---|---|
x | number | The X coordinate of the cell |
y | number | The X coordinate of the cell |
ch | string | The character to be placed on the specified cell |
- Source
setProperties($xml)
Loads the object settings from a specific JQuery XML element
Name | Type | Description |
---|---|---|
$xml | external:jQuery |
- Source