push3
This commit is contained in:
parent
012f96ae8d
commit
6ac04e5338
|
@ -433,7 +433,7 @@ const ColorModule = (() => {
|
||||||
if (refLayer)
|
if (refLayer)
|
||||||
color = refLayer.context.fillStyle;
|
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.fillStyle = color;
|
||||||
currFile.layers[i].context.strokeStyle = color;
|
currFile.layers[i].context.strokeStyle = color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,9 @@ class EyeDropperTool extends Tool {
|
||||||
// Returned colour
|
// Returned colour
|
||||||
let selectedColor;
|
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
|
// 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;
|
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++) {
|
for (let i=1; i<currFile.layers.length; i++) {
|
||||||
currFile.layers[i].copyData(currFile.layers[0]);
|
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) {
|
onEnd(mousePos, target) {
|
||||||
|
|
Loading…
Reference in New Issue