brinley / jSignature

jQuery plugin for adding web signature functionality
http://www.unbolt.net/jSignature
694 stars 530 forks source link

Line is positioned above touch point on iPad/iOS #12

Closed robertbird closed 12 years ago

robertbird commented 12 years ago

Hi, this is a great library, thankyou so much for sharing this!!

This works perfectly in a browser but when I tested on the latest version of iOS (5.1.1) I noticed that the line being drawn is slightly above the point on the screen that you touch. (I've tested this with a pen too).

It's ok when you get used to it, but for new users it seems to result in the signature going up at an angle as the user tries to compensate.

This is definitely more obvious on an iPad, but also happens to a lesser extent on the iPhone too.

dvdotsenko commented 12 years ago

Would you say the slight shift up is a "problem" or a "feature" for an average finger-using user?

robertbird commented 12 years ago

Thanks for the response, unfortunately I would say this is a problem for the average user.

It's as if you could just subtract a fixed amount from the vertical position when on iOS and it would be spot-on.

brinley commented 12 years ago

Hi Robert,

I haven't got a chance to try this out on an iPad but can you try to add a position relative on the containing element of your jSignature element? As I have seen an issue in an earlier version of jSignature which was caused by an incorrect calculation of the offset due to the positioning.

Regards, Brinley

dvdotsenko commented 12 years ago

Nahh. This is not a bug Brinley. This is a feature in jSig2 called Fat Finger Compensation. jSig detects touch devices and shifts the drawing a few pixels up.

We tested this on users internally and people loved it. They can see the line they are drawing behind the finger. Without the shift we saw a lot of finger lifting to see if what they wanted to draw came out right.

Based on enough research, I tend to say we keep the fat finger shift on touch devices, just scale it down a bit, maybe. I'll do some trials on this. Until then, it's a feature. :)

Daniel On May 26, 2012 1:55 AM, "Brinley Ang" < reply@reply.github.com> wrote:

Hi Robert,

I haven't got a chance to try this out on an iPad but can you try to add a position relative on the containing element of your jSignature element? As I have seen an issue in an earlier version of jSignature which was caused by an incorrect calculation of the offset due to the positioning.

Regards, Brinley


Reply to this email directly or view it on GitHub: https://github.com/brinley/jSignature/issues/12#issuecomment-5945581

brinley commented 12 years ago

Ah i see. In that case, why not add a configurable option to manage the offset with an overwritable default rather than fixing to 15?

robertbird commented 12 years ago

Ah ok, that makes sense. I can see that users would want to see the line they are drawing, but in my opinion it should be scaled down slightly. A configurable option would be ideal. Cheers for the explanation

dvdotsenko commented 12 years ago

Take a glance (with your preferred touch device) at demo here: http://willowsystems.github.com/jSignature/#/demo/

It's updated to have more modest Fat Finger Compensation shift.

There is also a new setting value you can yank around (as of commit https://github.com/willowsystems/jSignature/commit/4da181b5552645bccbd7fae15db5d07cc9301b9c ) - minFatFingerCompensation

Set it to 0 (zero) to disable the shift, which is still "ON" by default, but less rabid.

If the solution is acceptable, will push it to mainline repo.

brinley commented 12 years ago

I think its perfect! Merge it

robertbird commented 12 years ago

Wow, thanks for such a quick turnaround! It's perfect, exactly what I was after!

dvdotsenko commented 12 years ago

merged.