Points

interface Points

Manager for the collection of points in a line. Provides CRUD operations and reactive state for points.

Properties

Link copied to clipboard
abstract val state: Live<PointsState>

Reactive state containing all point managers.

Functions

Link copied to clipboard
abstract fun all(): List<PointManager>

Get all point managers (snapshot).

Link copied to clipboard
abstract fun append(label: String = "", x: Double = 0.0, y: Double = 0.0): PointManager

Append a new point and return its manager.

Link copied to clipboard
abstract fun find(id: String): PointManager?

Find a point manager by id.

Link copied to clipboard
abstract fun manager(point: Point): PointManager

Get or create a manager for the given point.

Link copied to clipboard
abstract fun remove(id: String): Point?

Remove a point by id and return the removed Point (if any).