From 2d899ac6da775a21eec856ae2339a94a4328f20f Mon Sep 17 00:00:00 2001 From: Raphael Parree Date: Wed, 25 Feb 2015 08:37:09 +0100 Subject: [PATCH 1/3] Corrected the param value to enable/disable (issue #44) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ddf1519..5c1d5fa 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ $("#elem").wScratchPad('image', './images/winner.png'); ```js $('#elem').wScratchPad('reset'); $('#elem').wScratchPad('clear'); -$('#elem').wScratchPad('enabled', ); +$('#elem').wScratchPad('enable', ); ``` From a054df833c22a15012618f1a6ed51ac2ef9cebd5 Mon Sep 17 00:00:00 2001 From: Raphael Parree Date: Wed, 25 Feb 2015 08:38:25 +0100 Subject: [PATCH 2/3] Fixed the gray thin border which appear in chrome When not using a proper src, chrome displays a thin gray border around the image. I have set the src to a 1x1 transparent pixel using a base64 encoded value --- src/wScratchPad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wScratchPad.js b/src/wScratchPad.js index 649de29..95931e0 100644 --- a/src/wScratchPad.js +++ b/src/wScratchPad.js @@ -29,7 +29,7 @@ this.$el.css('position', 'relative'); } - this.$img = $('').attr('crossOrigin', '').css({position: 'absolute', width: '100%', height: '100%'}); + this.$img = $('').attr('crossOrigin', '').css({position: 'absolute', width: '100%', height: '100%'}); // Make sure we sett style width height here for elastic stretch // and better support for mobile if we are resizing the scratch pad. From 7c71796399b1a6d640f7fa920792544648349a2b Mon Sep 17 00:00:00 2001 From: Raphael Parree Date: Mon, 23 Mar 2015 20:09:56 +0100 Subject: [PATCH 3/3] Removed thin border in Firefox The transparent pixel was not enough for thin thin border to be removed in Firefox (it was for chrome). Removing `crossOrigin` however did. --- src/wScratchPad.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wScratchPad.js b/src/wScratchPad.js index 95931e0..56de185 100644 --- a/src/wScratchPad.js +++ b/src/wScratchPad.js @@ -29,7 +29,7 @@ this.$el.css('position', 'relative'); } - this.$img = $('').attr('crossOrigin', '').css({position: 'absolute', width: '100%', height: '100%'}); + this.$img = $('').css({position: 'absolute', width: '100%', height: '100%'}); // Make sure we sett style width height here for elastic stretch // and better support for mobile if we are resizing the scratch pad. @@ -316,4 +316,4 @@ first.target.dispatchEvent(simulatedEvent); }); }; -})(jQuery); \ No newline at end of file +})(jQuery);