Compose-Extended-Gestures icon indicating copy to clipboard operation
Compose-Extended-Gestures copied to clipboard

PointerInputChange's `scrollData` is always `Offset.Zero`

Open cybercoder-naj opened this issue 1 year ago • 0 comments

Reproduction

    Canvas(
        modifier = modifier
            .clipToBounds()
            .pointerMotionEvents(
                onDown = {
                    motionEvent = MotionEvent.Down
                    Log.d("TAG", "Down Position: ${it.position}")
                    it.consume()
                },
                onMove = {
                    motionEvent = MotionEvent.Move
                    Log.d("TAG", "Move Position: ${it.position}")
                    Log.d("TAG", "Move Scroll: ${it.scrollDelta}")
                    it.consume()
                },
                onUp = {
                    motionEvent = MotionEvent.Up
                    Log.d("TAG", "Up Position: ${it.position}")
                    it.consume()
                }
            )
    ) { /* Drawing elements */ }

Bug description

When I touch my Canvas and scroll it vertically or horizontally, I always get Offset(0.0, 0.0) in the logcat.

2024-04-19_21-56

cybercoder-naj avatar Apr 19 '24 16:04 cybercoder-naj