Implemented eraser tool. Must move and resize layers at the same time.

Signed-off-by: npalomba <nicola.palomba@studenti.galileilivorno.gov.it>
This commit is contained in:
npalomba
2019-03-31 16:32:49 +02:00
parent 42a8ce3c4a
commit a9d380ec1d
17 changed files with 83 additions and 71 deletions

View File

@@ -12,7 +12,7 @@ function updateCursor () {
brushPreview.style.display = 'block';
brushPreview.style.width = eraserSize * zoom + 'px';
brushPreview.style.height = eraserSize * zoom + 'px';
context.fillStyle = 'rgba(255, 0, 0, 0)';
currentLayer.context.fillStyle = 'rgba(255, 0, 0, 0)';
} else
brushPreview.style.display = 'none';