Fix for Clear button in image editor

This commit is contained in:
patriceac 2023-03-24 00:08:51 -07:00 committed by GitHub
parent 55da2988b3
commit d1f341678c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,6 +171,7 @@ const IMAGE_EDITOR_ACTIONS = [
icon: "fa-solid fa-xmark",
handler: (editor) => {
editor.ctx_current.clearRect(0, 0, editor.width, editor.height)
imageEditor.setImage(null, editor.width, editor.height) // properly reset the drawing canvas
},
trackHistory: true
},