Skip to content

Commit

Permalink
Fixed a bug related to trim() for IE8.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjbradley committed Apr 15, 2014
1 parent 4fafa7a commit 33ebe1e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

**2.5.1 (Apr. 15, 2014)**

- Fixed a bug in IE 8 related to `trim()`, [Issue #113](https://github.com/thomasjbradley/signature-pad/issues/113)

**2.5.0 (Oct. 16, 2013)**

- Added an API to retrieve the version programmatically, [Issue #96](https://github.com/thomasjbradley/signature-pad/issues/96)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013, Thomas J Bradley
Copyright (c) 2014, Thomas J Bradley
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,50 @@
# Signature Pad
SignaturePad: A jQuery plugin for assisting in the creation of an HTML5 canvas based signature pad. Records the drawn signature in JSON for later regeneration.

Copyright MMXI, Thomas J Bradley, <[email protected]>
SignaturePad: A jQuery plugin for assisting in the creation of an HTML5 canvas based signature pad. Records the drawn signature in JSON for later regeneration.

Dependencies: FlashCanvas/1.5, json2.js, jQuery/1.3.2+
• Dependencies: FlashCanvas/1.5, json2.js, jQuery/1.3.2+
• Browser support: IE 6+, FF 3+, Safari 3+, Chrome, Opera 9+

Versioned using Semantic Versioning, <http://semver.org/>
---

## Quick Start

1. Include `jquery.signaturepad.css`, `flashcanvas.js`, `jquery.js`, `jquery.signaturepad.js`, `json2.js` in your HTML file
2. Create the HTML, following the example: <https://github.com/thomasjbradley/signature-pad/blob/master/examples/accept-signature.html>
3. `$('.sigPad').signaturePad();`
4. Remember that [most things are configurable](http://thomasjbradley.ca/lab/signature-pad#options)

## Complete Documentation

<http://thomasjbradley.ca/lab/signature-pad>

## Examples

- [Accepting a Signature](https://github.com/thomasjbradley/signature-pad/blob/master/examples/accept-signature.html)
- [Requiring a Drawn Signature](https://github.com/thomasjbradley/signature-pad/blob/master/examples/require-drawn-signature.html)
- [Regenerating a Signature](https://github.com/thomasjbradley/signature-pad/blob/master/examples/regenerate-signature.html)
- [Accepting Multiple Signatures](https://github.com/thomasjbradley/signature-pad/blob/master/examples/accept-multiple-signatures.html)

## Demos

- [Accepting a Signature](http://thomasjbradley.ca/lab/signature-pad-accept)
- [Requiring a Drawn Signature](http://thomasjbradley.ca/lab/signature-pad-require-drawn)
- [Regenerating a Signature](http://thomasjbradley.ca/lab/signature-pad-regenerate)

## Converting to an Image

<http://thomasjbradley.ca/lab/signature-pad/#images>

## Source Code

<http://github.com/thomasjbradley/signature-pad>

---

## License

© 2014, Thomas J Bradley, <[email protected]>

Signature Pad is licensed under the [New BSD license](https://github.com/thomasjbradley/signature-pad/blob/master/NEW-BSD-LICENSE.txt).

All dependencies: jQuery, json2.js, and FlashCanvas retain their own licenses.
2 changes: 1 addition & 1 deletion jquery.signaturepad.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ function SignaturePad (selector, options) {
*/
function type (val) {
var typed = $(settings.typed, context)
, cleanedVal = val.replace(/>/g, '&gt;').replace(/</g, '&lt;').trim()
, cleanedVal = $.trim(val.replace(/>/g, '&gt;').replace(/</g, '&lt;'))
, oldLength = typeItNumChars
, edgeOffset = typeItCurrentFontSize * 0.5

Expand Down
6 changes: 3 additions & 3 deletions jquery.signaturepad.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "signature-pad",
"version": "2.5.0",
"version": "2.5.1",
"private": true,
"license": "BSD-3-CLAUSE",
"description": "SignaturePad: A jQuery plugin for assisting in the creation of an HTML5 canvas based signature pad. Records the drawn signature in JSON for later regeneration.",
Expand Down

0 comments on commit 33ebe1e

Please sign in to comment.