fix color picker regression with intToColor missing

This commit is contained in:
juliandescottes 2016-10-09 23:49:31 +02:00
parent eb69c91d43
commit 91f637d2fd
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@
overlay.clear();
}
var frameColor = frame.getPixel(col, row);
var frameColor = pskl.utils.intToColor(frame.getPixel(col, row));
var highlightColor = this.getHighlightColor_(frameColor);
var size = this.supportsDynamicPenSize() ? pskl.app.penSizeService.getPenSize() : 1;
pskl.PixelUtils.resizePixel(col, row, size).forEach(function (point) {

View File

@ -19,7 +19,7 @@
*/
ns.ColorPicker.prototype.applyToolAt = function(col, row, frame, overlay, event) {
if (frame.containsPixel(col, row)) {
var sampledColor = frame.getPixel(col, row);
var sampledColor = pskl.utils.intToColor(frame.getPixel(col, row));
if (pskl.app.mouseStateService.isLeftButtonPressed()) {
$.publish(Events.SELECT_PRIMARY_COLOR, [sampledColor]);
} else if (pskl.app.mouseStateService.isRightButtonPressed()) {