From ad058e14b53667ca82d3caf627ed0b12a2501731 Mon Sep 17 00:00:00 2001 From: "a.kalmakhanov" Date: Sat, 16 Jul 2022 21:40:38 +0600 Subject: [PATCH] onFeatureClick removed --- .../kotlin/centre/sciprog/maps/compose/MapView.kt | 7 ++----- .../kotlin/centre/sciprog/maps/compose/MapViewJvm.kt | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/commonMain/kotlin/centre/sciprog/maps/compose/MapView.kt b/src/commonMain/kotlin/centre/sciprog/maps/compose/MapView.kt index 8cc99ce..ebd8483 100644 --- a/src/commonMain/kotlin/centre/sciprog/maps/compose/MapView.kt +++ b/src/commonMain/kotlin/centre/sciprog/maps/compose/MapView.kt @@ -21,7 +21,6 @@ expect fun MapView( computeViewPoint: (canvasSize: DpSize) -> MapViewPoint, features: Map, onClick: MapViewPoint.() -> Unit = {}, - onFeatureClick: (FeatureId) -> Unit = {}, //TODO consider replacing by modifier config: MapViewConfig = MapViewConfig(), modifier: Modifier = Modifier.fillMaxSize(), @@ -33,14 +32,13 @@ fun MapView( initialViewPoint: MapViewPoint, features: Map = emptyMap(), onClick: MapViewPoint.() -> Unit = {}, - onFeatureClick: (FeatureId) -> Unit = {}, config: MapViewConfig = MapViewConfig(), modifier: Modifier = Modifier.fillMaxSize(), buildFeatures: @Composable (FeatureBuilder.() -> Unit) = {}, ) { val featuresBuilder = MapFeatureBuilder(features) featuresBuilder.buildFeatures() - MapView(mapTileProvider, { initialViewPoint }, featuresBuilder.build(), onClick, onFeatureClick, config, modifier) + MapView(mapTileProvider, { initialViewPoint }, featuresBuilder.build(), onClick, config, modifier) } @Composable @@ -49,7 +47,6 @@ fun MapView( box: GmcBox, features: Map = emptyMap(), onClick: MapViewPoint.() -> Unit = {}, - onFeatureClick: (FeatureId) -> Unit = {}, config: MapViewConfig = MapViewConfig(), modifier: Modifier = Modifier.fillMaxSize(), buildFeatures: @Composable (FeatureBuilder.() -> Unit) = {}, @@ -65,5 +62,5 @@ fun MapView( ) MapViewPoint(box.center, zoom) } - MapView(mapTileProvider, computeViewPoint, featuresBuilder.build(), onClick, onFeatureClick, config, modifier) + MapView(mapTileProvider, computeViewPoint, featuresBuilder.build(), onClick, config, modifier) } \ No newline at end of file diff --git a/src/jvmMain/kotlin/centre/sciprog/maps/compose/MapViewJvm.kt b/src/jvmMain/kotlin/centre/sciprog/maps/compose/MapViewJvm.kt index b3efd11..9d5ef9c 100644 --- a/src/jvmMain/kotlin/centre/sciprog/maps/compose/MapViewJvm.kt +++ b/src/jvmMain/kotlin/centre/sciprog/maps/compose/MapViewJvm.kt @@ -41,7 +41,6 @@ actual fun MapView( computeViewPoint: (canvasSize: DpSize) -> MapViewPoint, features: Map, onClick: MapViewPoint.() -> Unit, - onFeatureClick: (FeatureId) -> Unit, config: MapViewConfig, modifier: Modifier, ) {