Skip to content

Commit

Permalink
Merge pull request #115 from Alplob/patch-1
Browse files Browse the repository at this point in the history
Add an .on() method to re-bind event
  • Loading branch information
szimek committed Sep 7, 2015
2 parents b908272 + 073110f commit badaafa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/js/signature_pad.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ var SignaturePad = (function (document) {
document.addEventListener("touchend", this._handleTouchEnd);
};

SignaturePad.prototype.on = function () {
this._handleMouseEvents();
this._handleTouchEvents();
};

SignaturePad.prototype.off = function () {
this._canvas.removeEventListener("mousedown", this._handleMouseDown);
this._canvas.removeEventListener("mousemove", this._handleMouseMove);
Expand Down

0 comments on commit badaafa

Please sign in to comment.