From 5474d1786fcd1a42f3b73fba68c67178cb5df9db Mon Sep 17 00:00:00 2001 From: Malcolm Diller Date: Wed, 21 Dec 2022 16:35:03 -0800 Subject: [PATCH] updated inpainter to not auto-clear itself whenever you draw etc --- ui/media/js/image-editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/media/js/image-editor.js b/ui/media/js/image-editor.js index aeb7115b..6f56c0f0 100644 --- a/ui/media/js/image-editor.js +++ b/ui/media/js/image-editor.js @@ -505,8 +505,10 @@ class ImageEditor { } setImage(url, 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) + if (!(url && this.inpainter)) { + this.layers.drawing.ctx.clearRect(0, 0, this.width, this.height) + } if (url) { var image = new Image() image.onload = () => {