mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
fix lighten bug when starting on transparent pixel
This commit is contained in:
parent
b556143b66
commit
a43b20e182
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
var doNotModify = isTransparent || (isSinglePass && usedPixels[key]);
|
var doNotModify = isTransparent || (isSinglePass && usedPixels[key]);
|
||||||
if (doNotModify) {
|
if (doNotModify) {
|
||||||
color = pixelColor;
|
color = window.tinycolor(pixelColor);
|
||||||
} else {
|
} else {
|
||||||
var step = isSinglePass ? DEFAULT_STEP * 2 : DEFAULT_STEP;
|
var step = isSinglePass ? DEFAULT_STEP * 2 : DEFAULT_STEP;
|
||||||
if (isDarken) {
|
if (isDarken) {
|
||||||
@ -63,10 +63,10 @@
|
|||||||
} else {
|
} else {
|
||||||
color = window.tinycolor.lighten(pixelColor, step);
|
color = window.tinycolor.lighten(pixelColor, step);
|
||||||
}
|
}
|
||||||
if (color) {
|
}
|
||||||
usedPixels[key] = true;
|
if (color) {
|
||||||
this.superclass.applyToolAt.call(this, col, row, color.toRgbString(), frame, overlay, event);
|
usedPixels[key] = true;
|
||||||
}
|
this.superclass.applyToolAt.call(this, col, row, color.toRgbString(), frame, overlay, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user