nx.data.Counter Class
Item Index
Methods
Methods
decrease
-
item
-
decrement
Decrease the count of given item.
Parameters:
-
item
AnyThe item to count.
-
decrement
NumberThe decrement, default 1.
Returns:
The decreasing result
dispose
()
Dispose current object.
getBinding
-
prop
Get existing binding object for specified property.
Parameters:
-
prop
Object
Returns:
getCount
-
item
Get count of specified item.
Parameters:
-
item
AnyThe counting item.
Returns:
Count of the item.
increase
-
item
-
increment
Increase the count of given item.
Parameters:
-
item
AnyThe item to count.
-
increment
NumberThe increment, default 1.
Returns:
The increasing result
setBinding
-
prop
-
expr
-
source
Set binding for specified property.
setCount
-
item
-
count
Set count of specified item.
Parameters:
-
item
AnyThe counting item.
-
count
NumberThe count to be set.
Returns:
Set result count.
Events
change
An event which notifies the happening of a count change of item.
Event Payload:
-
evt
ObjectThe event object with item, count, previousCount.
decrease
Same as change event but only happens on count decreasing.
Event Payload:
-
evt
ObjectThe event object with item, count, previousCount.
increase
Same as change event but only happens on count increasing.
Event Payload:
-
evt
ObjectThe event object with item, count, previousCount.