Expand all

ve.dm.TableMatrixCell

Constructor

new ve.dm.TableMatrixCell(node, row, col, [owner]) #

An object wrapping a table cell node, augmenting it with row and column indexes.

Cells which are occupied by another cell's with 'rowspan' or 'colspan' attributes are placeholders and have an owner property other than themselves. Placeholders are used to create a dense representation of the sparse HTML table model.

Parameters:

Name Type Attributes Description
node ve.dm.TableCellNode

DM Node

row number

Row index

col number

Column index

owner ve.dm.TableMatrixCell optional

Owner cell if this is a placeholder

Source:
An object wrapping a table cell node, augmenting it with row and column indexes.

Methods

equals(other) → {boolean} #

Compare to another cell

Cells are considered equal to their placeholders

Parameters:

Name Type Description
other ve.dm.TableMatrixCell

Cell to compare

Source:

Returns:

Cells are equal

Type
boolean

Compare to another cell

Cells are considered equal to their placeholders

getOwner() → {ve.dm.TableMatrixCell} #

Get owner matrix cell

Source:

Returns:

Owner cell

Type
ve.dm.TableMatrixCell
Get owner matrix cell

isPlaceholder() → {boolean} #

Check if this cell is a placeholder

Source:

Returns:

This cell is a placeholder

Type
boolean
Check if this cell is a placeholder

sortDescending(a, b) → {number}static #

Comparison function for sorting cells in text flow order

Parameters:

Name Type Description
a ve.dm.TableMatrixCell

First cell

b ve.dm.TableMatrixCell

Second cell

Source:

Returns:

Positive, negative or zero, depending on relative position

Type
number
Comparison function for sorting cells in text flow order