Class minplayer.flags
This is a class used to keep track of flag states which is used to control the busy cursor, big play button, among other items in which multiple components can have an interest in hiding or showing a single element on the screen.
Usage:
// Declare a flags variable.
var flags = new minplayer.flags();
// Set the flag based on two components interested in the flag.
flags.setFlag("component1", true);
flags.setFlag("component2", true);
// Print out the value of the flags. ( Prints 3 )
console.log(flags.flags);
// Now unset a single components flag.
flags.setFlag("component1", false);
// Print out the value of the flags.
console.log(flags.flags);
// Unset the other components flag.
flags.setFlag("component2", false);
// Print out the value of the flags.
console.log(flags.flags);
Defined in: minplayer.flags.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The flag.
|
|
Id map to reference id with the flag index.
|
|
The number of flags.
|
Method Attributes | Method Name and Description |
---|---|
setFlag(id, value)
Sets a flag based on boolean logic operators.
|
Field Detail
flag
The flag.
ids
Id map to reference id with the flag index.
numFlags
The number of flags.
Method Detail
setFlag(id, value)
Sets a flag based on boolean logic operators.
- Parameters:
- {string} id
- The id of the controller interested in this flag.
- {boolean} value
- The value of this flag ( true or false ).