meteoJS/synview/typeCollection . TypeCollection
Source: synview/
Collection of type-objects. Could ensure, that only a single type of this collection is visible.
new TypeCollection(options)
Parameter
Name | Type | Optional | Description |
---|---|---|---|
options |
|
|
Options. |
- Extends
- module:meteoJS/synview/collection.Collection
- Fires
- module:meteoJS/synview/typeCollection#change:typeVisible
Methods
append(type) → module:meteoJS/synview/typeCollection.TypeCollection
Append type to this collection. If type with same ID is present, the type will be exchanged.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
type |
|
Type. |
- Returns
containsId(id) → boolean
Returns if an ID exists in this collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
id |
|
|
ID. |
- Inherited from
- module:meteoJS/synview/collection.Collection#containsId
- Returns
-
If exists.
getCount() → integer
Returns count of items in this collection.
- Inherited from
- module:meteoJS/synview/collection.Collection#getCount
- Returns
-
Count.
getIndexById(id) → integer
Returns index of the item in this collecition, -1 if not existant.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
id |
|
|
ID. |
- Inherited from
- module:meteoJS/synview/collection.Collection#getIndexById
- Returns
-
Index.
getItemById(id) → module:meteoJS/synview/type.Type
Returns type with the passed ID or empty type if not existant.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
id |
mixed |
|
ID. |
- Returns
getItemIds() → Array of mixed
Returns a list of IDs (in order as appended).
- Inherited from
- module:meteoJS/synview/collection.Collection#getItemIds
- Returns
-
List of IDs.
getItems() → Array of Object
Returns items (in order as appended).
- Inherited from
- module:meteoJS/synview/collection.Collection#getItems
- Returns
-
Items.
getVisibleTypes() → Array of module:meteoJS/synview/type.Type
Returns the types of this collection with getVisible() == true.
- Returns
-
Array of module:meteoJS/synview/type.Type
Types.
isVisible() → boolean
Returns, if at least one type is visible.
- Returns
-
boolean
remove(id) → module:meteoJS/synview/collection.Collection
Removes an item from the collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
id |
|
|
ID of the item to delete. |
- Inherited from
- module:meteoJS/synview/collection.Collection#remove
- Fires
- module:meteoJS/synview/collection#remove:item
- Returns
-
This.
setExclusiveVisibility() → module:meteoJS/synview/typeCollection.TypeCollection
Sets the option exclusiveVisibility. If several types are visible and this will be set to true, then the first type in the getItems() iterator will stay visible.
- Returns
setSyncVisibility() → module:meteoJS/synview/typeCollection.TypeCollection
Sets the option syncVisibility. If any type is visible and this will be set to true, then every type will be set visible.
- Returns