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:
@@ -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,11 +63,11 @@
|
|||||||
} else {
|
} else {
|
||||||
color = window.tinycolor.lighten(pixelColor, step);
|
color = window.tinycolor.lighten(pixelColor, step);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (color) {
|
if (color) {
|
||||||
usedPixels[key] = true;
|
usedPixels[key] = true;
|
||||||
this.superclass.applyToolAt.call(this, col, row, color.toRgbString(), frame, overlay, event);
|
this.superclass.applyToolAt.call(this, col, row, color.toRgbString(), frame, overlay, event);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
Reference in New Issue
Block a user