fix lighten bug when starting on transparent pixel

This commit is contained in:
jdescottes 2014-07-14 16:44:36 +02:00
parent b556143b66
commit a43b20e182

View File

@ -55,7 +55,7 @@
var doNotModify = isTransparent || (isSinglePass && usedPixels[key]);
if (doNotModify) {
color = pixelColor;
color = window.tinycolor(pixelColor);
} else {
var step = isSinglePass ? DEFAULT_STEP * 2 : DEFAULT_STEP;
if (isDarken) {
@ -63,10 +63,10 @@
} else {
color = window.tinycolor.lighten(pixelColor, step);
}
if (color) {
usedPixels[key] = true;
this.superclass.applyToolAt.call(this, col, row, color.toRgbString(), frame, overlay, event);
}
}
if (color) {
usedPixels[key] = true;
this.superclass.applyToolAt.call(this, col, row, color.toRgbString(), frame, overlay, event);
}
};