mobomo / sketch.js

A jQuery plugin for dead simple Canvas-based drawing.
http://intridea.github.com/sketch.js
291 stars 110 forks source link

sketch is not continous & getting previous stroke onmouseout in ajax call #20

Open iam-raheem opened 10 years ago

iam-raheem commented 10 years ago

Hello, I used sketch.js for my drawing. i have 2 issues here.

1 - I'm not able to draw line continuously (long stroke). It taking some gaps & then it is filling.

2 - I have 4 images & using same canvas for all images. If i draw a line & den go to next image (ajax call & clearing canvas also) & onmouseout i'm getting the previously drawn line. I don't know why ? plz help me it is very urgent ..

srinu4122 commented 9 years ago

add these lines in sketch.js prototypes Sketch.prototype.clear = function() { this.actions = []; return this.redraw(); };

Add these lines in sketch.js tools $.sketch.tools.d = { onEvent: function(e){ this.clear(); } };