jimdoescode/jqScribble

can't add 2 canvas elements on the same page...

Closed this issue · 4 comments

// works
$("#canvas-1").jqScribble({'backgroundColor':'#dddddd'});

// don't work
$("#canvas-1,#canvas-2").jqScribble({'backgroundColor':'#dddddd'});

// touch event received on #canvas-1, draw is on #canvas-2 

Nice catch. I've confirmed it and will investigate.

So the problem is that I mistakenly assumed that the this pointer referred to the element instead of the jQuery instance. I will have a fix out over the weekend to correct this.

Sorry for the delay on this. I ended up re-engineering the entire plugin to be much more consistent with modern plugins. I have tested it with multiple canvases and it now works as expected. Again thanks for the bug report. Let me know if you have any issues with the latest version.

Cool !
Will check it out.
Much appreciated !