Skip to content

Commit

Permalink
Release v1.3.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
szimek committed Sep 24, 2014
1 parent 72cc14d commit 81dc902
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "signature_pad",
"description": "Library for drawing smooth signatures.",
"version": "1.3.2",
"version": "1.3.3",
"homepage": "https://github.com/szimek/signature_pad",
"author": {
"name": "Szymon Nowak",
Expand Down
11 changes: 7 additions & 4 deletions signature_pad.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* Signature Pad v1.3.2
* Signature Pad v1.3.3
* https://github.com/szimek/signature_pad
*
* Copyright 2013 Szymon Nowak
* Copyright 2014 Szymon Nowak
* Released under the MIT license
*
* The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:
Expand Down Expand Up @@ -58,12 +58,15 @@ var SignaturePad = (function (document) {

SignaturePad.prototype.fromDataURL = function (dataUrl) {
var self = this,
image = new Image();
image = new Image(),
ratio = window.devicePixelWidth || 1,
width = this._canvas.width / ratio,
height = this._canvas.height / ratio;

this._reset();
image.src = dataUrl;
image.onload = function () {
self._ctx.drawImage(image, 0, 0, self._canvas.width, self._canvas.height);
self._ctx.drawImage(image, 0, 0, width, height);
};
this._isEmpty = false;
};
Expand Down
6 changes: 3 additions & 3 deletions signature_pad.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 81dc902

Please sign in to comment.