Todayโs new web application is a Signature Signature. Our aim with this web application is โฆ
- capture a personโs signature (via an HTML(5) Canvas element) โฆ and be โฆ
- collecting that Signatureโs โSignatureโ in terms of a pen plotter pen up/pen down instructional โdefinitionโ (in some way shape or form) โฆ if the user is satisfied to โฆ
- save the Signatureโs โSignatureโ in a HTTP Cookie that can be remembered by this and other web applications, perhaps โฆ weโll see on this one
If youโre a programmer reading above, am sure you are immediately curious about โฆ
- cross-platform and cross-browser issues within the touch/mouse worlds โฆ you are not alone โฆ
- can a complicated signature be saved within the storage restrictions of HTTP Cookies? โฆ the room is getting more crowded โฆ
- cropping and initial canvas size concepts โฆ take a ticket โฆ
- how do you handle scaling and the implications to authenticity (of scaling) if you reuse this Signatureโs โSignatureโ in another context โฆ think thereโs room there squeezed up against the fridge
- astronauts in zero gravity? โฆ alright already!
โฆ but, nevertheless, letโs just creep up on the project, and see how we go, here, today, on a first draft.
Concentrating in on the HTML(5) Canvas element thoughts, what events will be of interest?
- mouse move event โonmousemoveโ (and its equivalent touch event(s)) โฆ for sure, and others, perhaps like โฆ
- mouse up โonmouseupโ (like pen up) (and its equivalent touch event(s))
- mouse down โonmousedownโ (like pen down) (and its equivalent touch event(s))
This โeventsโ concern we have, above, had a similar scenario to when we presented Canvas Email Attachment Scribble Tutorial, and so, with that in mind, we are going to have a web application that โฆ
- has a supervisory HTML and Javascript signature_signature
html โฆ calling on โฆ
- external Javascript has a supervisory HTML and Javascript signature_signature
js containing the Canvas element mouse/touch event logics
Here is a liverun link, and to see this in action, take a skeg at โฆ
If this was interesting you may be interested in this too.