Tools and Entities
Tools and Entities have a strong relationship in most cases. The state of an entity determines what a tool displays, how it is displayed (styling) and how it interacts with the user.
Up to 2.4.1, a tool could be connected to zero (none) or one (1) entity. As of 2.4.1, a tool can be connected to a list of entities.
Standalone/Unconnected Tools¶
A tool that is not connected to an entity, that is it has no entity_index: x
field is used solely for display purposes. This can be anyting, but circles, rectangles and lines are mostly used for that.
Example:
1 2 3 4 5 |
|
Single entity/Connected Tools¶
This is the most used combination: a tool is connected to a single entity to display its state and/or to have user interaction to for instance switch the entity on/off.
The tool has an entity_index: x
definition.
Example:
1 2 3 4 5 6 |
|
Multi-entity Tools¶
2.4.1 In this case, the tool has an entity_indexes
list definition instead of the entity_index: x
definition:
1 2 3 4 |
|
These multiple indexes can be used in the animations section to control the state/styling of the tool using other entities.
For instance, you want the tool to be hidden depending on the state of another entity:
Hide/Display tool | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|