RegionsAndImagesViewModel

class RegionsAndImagesViewModel @Inject constructor(mapRepository: RegionsAndImagesRepository) : ViewModel

The RegionsAndImagesViewModel is the point of connection between the Regions and Images screen and its Repository

Constructors

Link copied to clipboard
@Inject
constructor(mapRepository: RegionsAndImagesRepository)

Properties

Link copied to clipboard

The stream (Flow) of bounding box of the visible Images converted into UI objects.

Link copied to clipboard

The stream (Flow) of visible Images converted into UI objects.

Link copied to clipboard

The stream (Flow) of visible Regions converted into UI objects.

Functions

Link copied to clipboard
Link copied to clipboard
fun selectRegionAt(index: Int)

Delegates the repository to update the current region in the model. It creates a coroutine to do that.

Link copied to clipboard
fun visibleAreaChanged(boundingBoxViewData: BoundingBoxViewData)

Delegates the repository to update the current region (bounding box) in the model. It creates a coroutine to do that.