Nikolay Igotti
4 years ago
6 changed files with 60 additions and 14 deletions
@ -0,0 +1,10 @@
|
||||
package example.imageviewer.view |
||||
|
||||
import androidx.compose.ui.Modifier |
||||
import androidx.compose.ui.geometry.Offset |
||||
|
||||
actual fun Modifier.maybePointerMoveFilter( |
||||
onEnter: () -> Boolean, |
||||
onExit: () -> Boolean, |
||||
onMove: (Offset) -> Boolean |
||||
): Modifier = this |
@ -0,0 +1,10 @@
|
||||
package example.imageviewer.view |
||||
|
||||
import androidx.compose.ui.Modifier |
||||
import androidx.compose.ui.geometry.Offset |
||||
|
||||
expect fun Modifier.maybePointerMoveFilter( |
||||
onEnter: () -> Boolean = { true }, |
||||
onExit: () -> Boolean = { true }, |
||||
onMove: (Offset) -> Boolean = { true } |
||||
): Modifier |
@ -0,0 +1,11 @@
|
||||
package example.imageviewer.view |
||||
|
||||
import androidx.compose.ui.Modifier |
||||
import androidx.compose.ui.geometry.Offset |
||||
import androidx.compose.ui.input.pointer.pointerMoveFilter |
||||
|
||||
actual fun Modifier.maybePointerMoveFilter( |
||||
onEnter: () -> Boolean, |
||||
onExit: () -> Boolean, |
||||
onMove: (Offset) -> Boolean |
||||
): Modifier = this.pointerMoveFilter(onEnter = onEnter, onExit = onExit, onMove = onMove) |
Loading…
Reference in new issue