brinley / jSignature

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

dots and points... #3

Closed SourceryOne closed 13 years ago

SourceryOne commented 13 years ago

Hello, here's another suggestion:

Add a final dot when releasing the mousebutton, to be able to make "dots".

For reference or info see how they solved it in DrawBox: https://github.com/crowdsavings/jquery.drawbox

brinley commented 13 years ago

I've just implemented this using a different approach from DrawBox. Check it out and let me know what you think

SourceryOne commented 13 years ago

From a signature point of view it is probably a nice touch, as a dot is created on mouse up. It looks a bit strange though when you draw a line very fast, as the last pixels in the line is a bit faded (for effect I guess) and then you get a dot after that. Just an example if I cant exlain myself correctly: example of dots after lines

It is good enough for me though :)

Thanks again,

brinley commented 13 years ago

Its actually not an intentional effect but caused by canvas behaviour when drawing a 1px line which occasionally causes it to look like 2px. However under certain angles of drawing the line it does appear as 1px hence the faded look.

Anyway I added a check so that the dot is not created on mouse up if the onmove was triggered.

Check out the latest from the repo and see if it fixes the issue.

Cheer!

SourceryOne commented 13 years ago

This looks so much better! Really great. I say this issue is closed! :)