Fixed bug in canvas dragging, must fix the one on resizing.

Signed-off-by: npalomba <nicola.palomba@studenti.galileilivorno.gov.it>
This commit is contained in:
npalomba
2019-03-31 17:15:03 +02:00
parent a9d380ec1d
commit 16d816db18
8 changed files with 53 additions and 29 deletions

View File

@@ -3,10 +3,14 @@ function newPixel (width, height, palette) {
currentLayer = new Canvas(width, height, canvas);
currentLayer.initialize();
checkerBoard = new Canvas(width, height, checkerBoard);
checkerBoard = new Canvas(width, height, checkerBoardCanvas);
checkerBoard.initialize();
canvasSize = currentLayer.canvasSize;
layers.push(currentLayer);
layers.push(checkerBoard);
//remove current palette
colors = document.getElementsByClassName('color-button');
while (colors.length > 0) {