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

14 lines
515 B
Kotlin
Raw Normal View History

2022-12-24 22:59:33 +03:00
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 = {},
)