mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Connected events to rect selection
_rectSelect.js now knows when the user started and finished drawing a rect and is able to edit a preview.
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
|
||||
function newPixel (width, height, palette) {
|
||||
// Setting the current layer
|
||||
currentLayer = new Canvas(width, height, canvas);
|
||||
currentLayer.initialize();
|
||||
|
||||
// Adding the checkerboard behind it
|
||||
checkerBoard = new Canvas(width, height, checkerBoardCanvas);
|
||||
checkerBoard.initialize();
|
||||
|
||||
// Creating the vfx layer on top of everything
|
||||
VFXLayer = new Canvas(width, height, VFXCanvas);
|
||||
VFXLayer.initialize();
|
||||
|
||||
canvasSize = currentLayer.canvasSize;
|
||||
|
||||
// Adding the first layer and the checkerboard to the list of layers
|
||||
layers.push(VFXLayer);
|
||||
layers.push(currentLayer);
|
||||
layers.push(checkerBoard);
|
||||
|
||||
|
Reference in New Issue
Block a user