Sometimes you want your users to select only a sub-shape within a shape, for example:

  • Select a single point in a polyline

  • Select a single vertex in a polygon

  • If your domain object is visualized with multiple shapes, select just one of those shapes.

However, in the LuciadLightspeed API, the unit of selection is the domain object. All sub-shapes of the domain object are selected and de-selected at once.

The solution to allow for sub-shape selection is to model the sub-shapes as domain objects. For example, to allow users to select the individual points of a polyline and not the polyline itself, you can:

  1. Create a non-selectable layer with a model containing the polylines.

  2. Create a secondary, selectable layer with a model containing only the individual points of the polyline.