This commit is contained in:
pxlvxl 2022-02-25 14:06:44 -05:00
parent 012f96ae8d
commit 6ac04e5338
3 changed files with 7 additions and 2 deletions

View File

@ -433,7 +433,7 @@ const ColorModule = (() => {
if (refLayer)
color = refLayer.context.fillStyle;
for (let i=0; i<currFile.layers.length - 1; i++) {
for (let i=0; i<currFile.layers.length; i++) {
currFile.layers[i].context.fillStyle = color;
currFile.layers[i].context.strokeStyle = color;
}

View File

@ -86,7 +86,9 @@ class EyeDropperTool extends Tool {
// Returned colour
let selectedColor;
for (let i=1; i<currFile.layers.length-3; i++) {
for (let i=0; i<currFile.layers.length; i++) {
if(!currFile.layers[i].isVisible)continue;
// Getting the colour of the pixel in the cursorLocation
tmpColour = currFile.layers[i].context.getImageData(Math.floor(cursorLocation[0]/currFile.zoom),Math.floor(cursorLocation[1]/currFile.zoom),1,1).data;

View File

@ -31,6 +31,9 @@ class PanTool extends Tool {
for (let i=1; i<currFile.layers.length; i++) {
currFile.layers[i].copyData(currFile.layers[0]);
}
for (let i=0; i<currFile.sublayers.length; i++) {
currFile.sublayers[i].copyData(currFile.layers[0]);
}
}
onEnd(mousePos, target) {