Asset selectability
HTML Drawing Control
Asset selectability
Click the asset to select it, or use the toolbar's Select command to draw a rectangle around it.
In HTML drawing control, the selectionMode value in javascript controls the selectability of assets by mouse-clicking, or by the drawing toolbar's Select command .
The selectionMode has these optional values:
- 0 – All assets are not selectable (default).
-
1 – Selectable assets are determined by certain business logic through a dataSource definition. Virtual Private Archibus (VPA) is applicable in this case. The dataSource for asset selection may not be the same as highlight or label dataSources.
- This case is most likely used by real apps.
- App developers have to specify a selection datasource to enable VPA applicable asset selection.
- Developers could specify parameters in selection dataSource, and pass run-time parameter values with the highlight parameter hs_param.
- SVG elements for assets have selectable=true|false.
In a real application, with all rooms selectable, you should use selectionMode=1, and a selection datasource without any particular restrictions.
In drawing javascript files, set up selectionMode as follows:
<panel type="drawing" id="assignPeopleDrawing_cadPanel" layoutRegion="row1col2" multiple="false" selectionMode="1" assignMode="1" highlightDataSource="assignPeopleDrawing_vacantRoomsDs" labelsDataSource="assignPeopleDrawing_drawingControlLabelsDs"> <title translatable="true">[]</title> </panel>