mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
push3
This commit is contained in:
parent
012f96ae8d
commit
6ac04e5338
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user