can't add 2 canvas elements on the same page...
Closed this issue · 4 comments
FLasH3r commented
// 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
jimdoescode commented
Nice catch. I've confirmed it and will investigate.
jimdoescode commented
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.
jimdoescode commented
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.
FLasH3r commented
Cool !
Will check it out.
Much appreciated !