Class: CategoryItem

observer~CategoryItem(name, type, index) → {CategoryItem}

new CategoryItem(name, type, index) → {CategoryItem}

The class acts as a category button. It creates the HTML elements it needs and responds to the click events it gets.
Parameters:
Name Type Description
name String The name to be displayed on the button.
type number The type of the category (TIMED or COUNTED).
index number The index of the category button.
Source:
Returns:
Type
CategoryItem

Methods

(inner) initCountedCategory(this_)

The private method initializes the category button to behave as a category that counts the click events it gets.
Parameters:
Name Type Description
this_ CategoryItem The category button.
Source:

(inner) initTimedCategory(this_)

The private method initializes the category button to behave as a time interval category.
Parameters:
Name Type Description
this_ CategoryItem The category button.
Source:

(inner) updateValueDiv(this_, text)

The private method replaces the contents of the HTML element that displays the value of the category button.
Parameters:
Name Type Description
this_ CategoryItem The category button.
text String The text to replace the contents of the element with.
Source: