updated inpainter to not auto-clear itself whenever you draw etc

This commit is contained in:
Malcolm Diller 2022-12-21 16:35:03 -08:00
parent 7f36473544
commit 5474d1786f

View File

@ -505,8 +505,10 @@ class ImageEditor {
} }
setImage(url, width, height) { setImage(url, width, height) {
this.setSize(width, height) this.setSize(width, height)
this.layers.drawing.ctx.clearRect(0, 0, this.width, this.height)
this.layers.background.ctx.clearRect(0, 0, this.width, this.height) this.layers.background.ctx.clearRect(0, 0, this.width, this.height)
if (!(url && this.inpainter)) {
this.layers.drawing.ctx.clearRect(0, 0, this.width, this.height)
}
if (url) { if (url) {
var image = new Image() var image = new Image()
image.onload = () => { image.onload = () => {