mobomo / sketch.js

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

Fix for eraser bug in firefox #4

Closed kmstrong closed 11 years ago

kmstrong commented 12 years ago

The way the eraser tool is currently implemented causes it to erase the entire sketch in firefox. This is a simple fix which will make the eraser work the same way it does in chrome.

see: http://stackoverflow.com/questions/3328906/erasing-in-html5-canvas

"Note that firefox 3.6/4.0 implement 'copy' by erasing the entire background first. The w3c docs aren't clear as to what should happen here. Chrome (webkit?) interprets the specs as 'only where pixels are actually drawn', for example the result of a stroke()."

JoseTomasTocino commented 11 years ago

Thank you very much for this fix! I hope this gets merged because it's a must. Thanks again, works like a charm.