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

Strokes are not being rendered #153

Closed
danbliss97 opened this issue Jun 20, 2018 · 6 comments
Closed

Strokes are not being rendered #153

danbliss97 opened this issue Jun 20, 2018 · 6 comments

Comments

@danbliss97
Copy link

We are using JSignature in a cordova application and are seeing an issue on some android devices where strokes are being recorded but not rendered. Weirdly, if you tap a text entry field to open the keyboard the strokes are now rendered and will continue to be rendered as you add more strokes.

I've been looking at this for a few days now and haven't been able to figure anything out, any suggestions to what might be wrong?

@brinley
Copy link
Owner

brinley commented Jun 21, 2018

I believe the event object is slightly different for multi touch devices but if the stroke is rendering when you tap else where then perhaps the event that triggers the render IIRC ontouchend is not getting triggered. Can you check that? Unfortunately I don’t have the time to look deeper into this issue, but if you can fix the issue I would be more than happy to review the PR.

@brinley
Copy link
Owner

brinley commented Jun 21, 2018

See if something like d3/d3-zoom#120 will solve the issue

@danbliss97
Copy link
Author

I've checked and it's definitely calling ontouchend.

I should add also, after having tapped in the text entry to render the strokes, any further strokes are rendered as normal.

@brinley
Copy link
Owner

brinley commented Jun 22, 2018

Can you debug the movementHandlers drawEndHandler and drawStartHandler if they are being called correctly? If thats fine, check DataEngine's startStroke, after that the last place to check is strokeStartCallback which updates the canvas. The issue should be somewhere along that flow

@danbliss97
Copy link
Author

danbliss97 commented Jun 25, 2018

Upon further investigation, I have found this line in logcat showing repeatedly while attempting to draw a signature:

"WebViewInputDispatcher: Webkit prevent current and last event, cancel ui event."

Seems like it might be a clue to the issue, I will continue to investigate.

@danbliss97
Copy link
Author

I solved this a week ago but forgot to update here.

I fixed my issue by copying over the newest files from here and re-writing our custom code. There must have been something missing I didn't spot because it was as simple as that.

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

No branches or pull requests

2 participants