GetStream / sketchbook-compose

🎨 Jetpack Compose canvas library that helps you draw paths, images on canvas with color pickers and palettes.
https://getstream.github.io/sketchbook-compose/
Apache License 2.0
444 stars 25 forks source link

Sketchbook not working in ModalBottomSheetLayout #13

Open drdla49 opened 2 years ago

drdla49 commented 2 years ago

I use sketchbook version 1.0.4. If I add a sketchbook to ModalBottomSheetLayout only drawing that work are horizontal lines. ModalBottomSheetLayout steel events and sketchbook don't draw anything if I draw vertically.

skydoves commented 2 years ago

Hi @drdla49, Sketchbook composable function supports onEventListener and you can track the MotionEvent. I'm wondering if you can prevent scrolling behaviors of ModalBottomSheetLayout while touching down/move.

michallepicek commented 2 years ago

Stopping ModalBottomSheetLayout from moving/sliding/dragging is easy, but it still steals all the vertical events and therefore prevents from drawing properly.