maps-kt/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/ViewConfig.kt

14 lines
515 B
Kotlin

package center.sciprog.maps.features
import androidx.compose.ui.input.pointer.PointerEvent
import androidx.compose.ui.unit.DpSize
public data class ViewConfig<T : Any>(
val zoomSpeed: Double = 1.0 / 3.0,
val onClick: ViewPoint<T>.(PointerEvent) -> Unit = {},
val dragHandle: DragHandle<T> = DragHandle.bypass(),
val onViewChange: ViewPoint<T>.() -> Unit = {},
val onSelect: (Rectangle<T>) -> Unit = {},
val zoomOnSelect: Boolean = true,
val onCanvasSizeChange: (DpSize) -> Unit = {},
)