From cf983de3ffb5260603e8693db2b8620649c12ed5 Mon Sep 17 00:00:00 2001 From: Shivam Dhuria Date: Sun, 6 Feb 2022 01:08:35 +0530 Subject: [PATCH] added z indix to canvas modifier to register clicks when palette is hidden --- palette/src/main/java/com/elixer/palette/composables/Palette.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/palette/src/main/java/com/elixer/palette/composables/Palette.kt b/palette/src/main/java/com/elixer/palette/composables/Palette.kt index 829e51b..5799216 100644 --- a/palette/src/main/java/com/elixer/palette/composables/Palette.kt +++ b/palette/src/main/java/com/elixer/palette/composables/Palette.kt @@ -152,7 +152,7 @@ fun Palette( BoxWithConstraints( modifier = Modifier - .zIndex(if (isPaletteDisplayed.value) 0f else -3f) + .zIndex(if (isPaletteDisplayed.value) Float.MAX_VALUE else 0f) .fillMaxSize() .pointerInput(Unit) { detectDragGestures(