Open wakaztahir opened 3 years ago
I also removed Box and Surface , But panning still didn't work on canvas !
It might because that Canvas consumes the position changes and Zoomable can not receive these changes, can you share more complete code of it?
Sketcher only consumes the event if zoom is not enabled otherwise returns true in pointerInteropFilter !! tried returning false , doesn't work
Could you please create a canvas and test panning and check why it might be failing ?
OK , I have zoom enabled as a mutable state in my view model , that goes into the zoomable When I have set it to true in the view model , PANNING WORKS but if I set it to false , and set it to true again through a button PANNING does not work
When set to true initially (in view model)
So basically enabled should work always , with the change of state and everything , panning should not consume touch events when zoom is disabled or maybe when panning is disabled
I can send zoomEnabled to true initially whish should solve my panning and zooming problem but setting it false again should disable panning and should not consume touch events so I can draw on canvas
enable (ZoomEnabled) is initially true (to make panning work) Zoom button changes zoom enabled state
As you can see I have a Box with Surface and a Canvas inside it and panning is not working , zooming is working and my drawing is displaying , I had a previous issue of zoom expanding the surface of canvas over other views which I fixed by clip to bounds modifier you can see on Zoomable
Getting rid of that modifier does not cause panning to work but instead that issue returns , I am not sure if this is an issue with your library or Compose works like this