Clear top context in toDataURL* methods. Closes #399

This commit is contained in:
kangax 2013-01-25 14:20:53 +01:00
parent 90b383246f
commit 268dbb2114

View file

@ -688,6 +688,8 @@
var data = (fabric.StaticCanvas.supports('toDataURLWithQuality'))
? canvasEl.toDataURL('image/' + format, quality)
: canvasEl.toDataURL('image/' + format);
this.contextTop && this.clearContext(this.contextTop);
this.renderAll();
return data;
},
@ -741,6 +743,7 @@
this.setActiveObject(activeObject);
}
this.contextTop && this.clearContext(this.contextTop);
this.renderAll();
return dataURL;