so much better

This commit is contained in:
tim h 2022-11-30 21:25:06 -06:00
parent 3194f65253
commit e0eed2831c

View file

@ -222,17 +222,7 @@ const _generate = async (endpoint, request, bb) => {
// Cleans up
const clean = (removeBrushMask = false) => {
if (removeBrushMask) {
// don't want to put this in history, so not applicable for runCommand()
// probably a better way to do this though
var clearArea = maskPaintLayer.ctx.createImageData(bb.w, bb.h);
var clearD = clearArea.data;
for (i = 0; i < clearD.length; i += 4) {
clearD[i] = 0;
clearD[i + 1] = 0;
clearD[i + 2] = 0;
clearD[i + 3] = 0;
}
maskPaintLayer.ctx.putImageData(clearArea, bb.x, bb.y);
maskPaintCtx.clearRect(bb.x, bb.y, bb.w, bb.h);
}
stopMarchingAnts();
imageCollection.inputElement.removeChild(imageSelectMenu);