当前位置: 首页 > 文档资料 > ThingJS 文档中心 >

Class: GroupState

优质
小牛编辑
130浏览
2023-12-01

THING~ GroupState

GroupState The group to control enable/disable state.


new GroupState(param)

constructor.

Parameters:
NameTypeDescription
paramObject

The initial parameters.

Members


states :Object

Get the states.

Type:
  • Object

Methods


clear()

Clear all states.


enable(value, name, priority)

Enable/Disable.

Parameters:
NameTypeDescription
valueBoolean

Enable or disable.

nameString

The group name.

priorityNumber

The group priority, check enable state from high to low.


getValue(name) → {*}

Get value by name.

Parameters:
NameTypeDescription
nameString

The group name.

Returns:
Type
*

isAnyEnable() → {Boolean}

Check whether it's enable.

Returns:
Type
Boolean

isEnable(name) → {Boolean}

Check whether it's enable.

Parameters:
NameTypeDescription
nameString

The group name, if do not proivde then indicates get the final state.

Returns:
Type
Boolean