Provides a way to define a mapping from a collection of items to a common value for each item for usage in conjunction with class LayoutData.
Inheritance Hierarchy
ItemCollectionMapping
Remarks
This class supports LayoutData implementations and does not usually have to be instantiated by client code explicitly. Instances of this class are properties of concrete LayoutData implementations.
Type Parameters
- TItem
- The type of the items that are mapped.
- TValue
- The type of the values the items are mapped to.
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.layout.ItemCollectionMapping
See Also
Constructors
Creates a new instance of ItemCollectionMapping<TItem,TValue>.
Methods
Adds the specified value which will be associated to all items in the returned item collection.
Remarks
Use the returned ItemCollection<TItem> to conveniently specify the items which should be mapped to the the specified collection value.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- collectionValue - TValue
- The value the items of the returned collection are mapped to.
Returns
- ↪ItemCollection<TItem>
- The items that are mapped to the given value.
Clears all mappings that were defined using add.