Implemented lock function

Now a layer can be locked and unlocked and it's possible to edit a layer only if the layer is not locked.
This commit is contained in:
unsettledgames
2020-06-19 12:57:07 +02:00
parent 750414d63a
commit 066582e309
4 changed files with 30 additions and 7 deletions

View File

@ -6,6 +6,10 @@ function newPixel (width, height, palette) {
// Setting up the current layer
currentLayer = new Layer(width, height, canvas, layerListEntry);
// Cloning the entry so that when I change something on the first layer, those changes aren't
// propagated to the other ones
layerListEntry = layerListEntry.cloneNode(true);
// Adding the checkerboard behind it
checkerBoard = new Layer(width, height, checkerBoardCanvas);