wScratchPad
wScratchPad copied to clipboard
Not working on Android 4.2 , some suggests
there are some bug with canvas when set content.globalCompositeOperation 'destination-out' on android 4.2. browser does not change the view when we arc or move on the canvas with an alpha color. so i have to change the style of the canvas to make browser redraw after scratchDown scratchMove and scratchUp. i hope u can find a good way to fix this bug,thx.
i do like this: $this.canvas.css('margin-right', 0px or 1px)// change the margin right in 0px and 1px
other, the wScratchPad does not work with zepto, can we make some change to support it.
I'll try looking into it soon, just updating the blog at the moment. On Jun 7, 2013 11:49 PM, "websiteflash" [email protected] wrote:
there are some bug with canvas when set content.globalCompositeOperation 'destination-out' on android 4.2. browser does not change the view when we arc or move on the canvas with an alpha color. so i have to change the style of the canvas to make browser redraw after scratchDown scratchMove and scratchUp. i hope u can find a good way to fix this bug,thx.
i do like this: $this.canvas.css('margin-right', 0px or 1px)// change the margin right in 0px and 1px
other, the wScratchPad does not work with zepto, can we make some change to support it.
— Reply to this email directly or view it on GitHubhttps://github.com/websanova/wScratchPad/issues/15 .
I am having the same issue on Android 4.2.2. Did you find a fix for this bug ? Thanks.
Added jquery.mobile-1.2.0.min.js will fix this bug.
Fixed double reload page need add "data-role" attribute:
I am having trouble getting this to work on Samsung Galaxy S3. Any pointers?
Thanks!
I am also having trouble with this plugin. I found that the changedTouches in touchmove event could be null on some android webview. So I fixed it in this way;
$el.bind('touchstart touchmove touchend touchcancel', function (event) { var touches = event.changedTouches; if (event.changedTouches == null) { touches = event.originalEvent.targetTouches; } var first = touches[0], type = "" blahblah }
Then, the browser still not change when I touch it, and i tried this to redraw the view. $($this.canvas).css('margin-right',Math.random()+'px'); // I don't know why 0px did not work and this is not a good way.
This is not the end. Another issue came out that the callback function didn't work!!
Anyone know why?
Similar redraw problem occurred to me, but in my case, only some of the HTC's newer models won't work (eg: butterfly and one, we found so far). I (kind of) solved it by set 'realtimePercent' to true. (HTC One works, but still no use in butterfly).
Any news about this bug? I can scratch when i use this code: $(this.canvas).css('margin-right', $(this.canvas).css('margin-right') == "0px" ? "1px" : "0px");
Its not a proper fix, feels laggy. Hope u have a fix for it very soon ;)
Great work on the plugin.
try using new 2.0.0 version and see if there are still issues.
I find out that perhaps it's the globalCompositeOperation attribute of canvas that makes the plugin not working on the Android 4.2. Some browsers don't fully support this attributes.
2.0.0 still does not work in opera and firefox.
@kulang21 try this out: touches = (event.originalEvent.changedTouches || event.originalEvent.targetTouches) It works for me. By the way, there are still some scaling cavas image problem in some device. Any one fix that?
I tried Android 4.2.2 Browser and nothing scratched off, still.
2.0.0 still does not work on Android 4.1 - 4.3