Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Not working on Android 4.2 , some suggests #15

Open
websiteflash opened this issue Jun 7, 2013 · 14 comments
Open

Not working on Android 4.2 , some suggests #15

websiteflash opened this issue Jun 7, 2013 · 14 comments

Comments

@websiteflash
Copy link

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.

@websanova
Copy link
Owner

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//issues/15
.

@amseddi
Copy link

amseddi commented Aug 4, 2013

I am having the same issue on Android 4.2.2.
Did you find a fix for this bug ?
Thanks.

@liangwenke
Copy link

Added jquery.mobile-1.2.0.min.js will fix this bug.

@liangwenke
Copy link

Fixed double reload page need add "data-role" attribute:

@gxlbox
Copy link

gxlbox commented Oct 9, 2013

I am having trouble getting this to work on Samsung Galaxy S3. Any pointers?

Thanks!

@kulang21
Copy link

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?

@mutekinootoko
Copy link

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).

@jacoweb
Copy link

jacoweb commented Apr 2, 2014

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.

@websanova
Copy link
Owner

try using new 2.0.0 version and see if there are still issues.

@Edward1992
Copy link

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.

@domyway
Copy link

domyway commented Jun 1, 2014

2.0.0 still does not work in opera and firefox.

@sy-tang
Copy link

sy-tang commented Jun 25, 2014

@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?

@clippit
Copy link

clippit commented Jul 30, 2014

I tried Android 4.2.2 Browser and nothing scratched off, still.

@wzw1990
Copy link

wzw1990 commented Sep 23, 2014

2.0.0 still does not work on Android 4.1 - 4.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests