Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawsana View not rendering any shape layers once, palm of the drawer sits on the view for some time #34

Open
asiaoverseas opened this issue Nov 5, 2019 · 7 comments

Comments

@asiaoverseas
Copy link

When someone draws in the drawsana view, when its an ipad, its natural that, the palm of the hand of person sits on the screen. So there is this weird bug, where, the drawing functionality works properly, until, someone puts their hand or palm on screen. After that, trying to draw on new shape, nothing gets drawn.

I added break points to check the flow, and though nothing gets drawn the flow is working i.e. did-pan gesture recogniser gets called, but doesn't render new layers.

@stevelandeyasana
Copy link
Collaborator

Thanks so much for digging in to investigate. This sounds pretty weird and I'm not immediately sure what the problem is.

@ramjyroo
Copy link

ramjyroo commented Aug 3, 2020

@stevelandeyasana In my case - when the bottom up swipe gesture was done to bring up iOS dock - the PAN gesture was draw view was also inadvertently getting triggered as I had kept the draw area span the entire screen.

During the swipe up gesture - PAN gesture recogniser never seems to get end event and as a result when the dock is dismissed and app is in foreground - it somehow keeps detecting "changed" events but never sees a end event. So no drawing is rendered.

For now - I have made the drawing area smaller to avoid clash of pan gesture of drawsana with that bottom up swipe in iPadOS

@stevelandeyasana
Copy link
Collaborator

Great clues, thanks! I'll see if I can dig deeper.

@ramjyroo
Copy link

ramjyroo commented Aug 4, 2020

Thanks a bunch for this awesome framework @stevelandeyasana

@ramjyroo
Copy link

ramjyroo commented Sep 3, 2020

@stevelandeyasana A lot of my beta testers also inadvertently used their palm or touched multiple points on the screen - there by triggering touches that get ignored. Once it goes it into this state - Immediate Pan gesture is not getting out of this state.

Should I set a bool variable when a ignored touch ended is seen and reset the trackTouch object in the immediate next touches began.

// setting didIgnoreToucheEnded to true when touchesEnded ignores the touch
guard touches.contains(trackedTouch) else {
   print("touchesEnded - Skip processing as trackedTouch is not in touches set")
   **didIgnoreToucheEnded = true**
   return
 }

And check the didIgnoreToucheEnded in touches began to reset trackTouch? Any suggestions from you in this regard will greatly help.
Thanks in advance
Ram

@ramjyroo
Copy link

ramjyroo commented Oct 1, 2020

@stevelandeyasana As a gentle reminder - could you reply on my proposal above?. Thanks a bunch in advance

@stevelandeyasana
Copy link
Collaborator

I haven't had time to look at the code and see if this will get the result you expect, but if you fork the library and try it out and it works, I'd be happy to merge the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants