whoops, painted masks weren't cleared on new image

This commit is contained in:
tim h 2022-11-18 20:08:43 -06:00
parent 20d12b378a
commit 6e9013ade7

View file

@ -225,6 +225,7 @@ function reject(evt) {
}
function newImage(evt) {
clearPaintedMask();
clearBackupMask();
clearTargetMask();
clearImgMask();
@ -291,6 +292,10 @@ function clearImgMask() {
imgCtx.clearRect(0, 0, imgCanvas.width, imgCanvas.height);
}
function clearPaintedMask() {
maskPaintCtx.clearRect(0, 0, maskPaintCanvas.width, maskPaintCanvas.height);
}
function placeImage() {
const img = new Image();
img.onload = function () {