mw.widgets.CheckMatrixWidget

A JavaScript version of CheckMatrixWidget.

Extends

Constructor

new mw.widgets.CheckMatrixWidget(config) #

Create an instance of mw.widgets.CheckMatrixWidget.

Parameters:

Name Type Attributes Description
config Object optional

Configuration options

Properties:
Name Type Attributes Description
columns Object

Required object mapping column labels (as HTML) to their tags.

rows Object

Required object mapping row labels (as HTML) to their tags.

forcedOn Array.<string> optional

Array of column-row tags to be displayed as enabled but unavailable to change.

forcedOff Array.<string> optional

Array of column-row tags to be displayed as disabled but unavailable to change.

tooltips Object optional

Optional object mapping row labels to tooltips (as text, will be escaped).

tooltipsHtml Object optional

Optional object mapping row labels to tooltips (as HTML). Takes precedence over text tooltips.

Source:

Methods

isTagDisabled(tagName) → {boolean} #

Check whether the given tag is disabled.

Parameters:

Name Type Description
tagName string

Tag name

Source:

Returns:

Tag is disabled

Type
boolean
Check whether the given tag is disabled.

isTagSelected(tagName) → {boolean} #

Check whether the given tag is selected.

Parameters:

Name Type Description
tagName string

Tag name

Source:

Returns:

Tag is selected

Type
boolean
Check whether the given tag is selected.