diff --git a/src/js/drawingtools/ColorPicker.js b/src/js/drawingtools/ColorPicker.js index 6fbf8286..5a0de4ee 100644 --- a/src/js/drawingtools/ColorPicker.js +++ b/src/js/drawingtools/ColorPicker.js @@ -20,22 +20,10 @@ ns.ColorPicker.prototype.applyToolAt = function(col, row, color, frame, overlay, event) { if (frame.containsPixel(col, row)) { var sampledColor = frame.getPixel(col, row); - if (event.ctrlKey) { - pskl.app.piskelController.getPiskel().getLayers().forEach(function (l) { - l.getFrames().forEach(function (f) { - f.forEachPixel(function (pixelColor,x,y) { - if (pixelColor === sampledColor) { - f.setPixel(x, y, pskl.app.paletteController.getPrimaryColor()); - } - }); - }); - }); - } else { - if (event.button == Constants.LEFT_BUTTON) { - $.publish(Events.SELECT_PRIMARY_COLOR, [sampledColor]); - } else if (event.button == Constants.RIGHT_BUTTON) { - $.publish(Events.SELECT_SECONDARY_COLOR, [sampledColor]); - } + if (event.button == Constants.LEFT_BUTTON) { + $.publish(Events.SELECT_PRIMARY_COLOR, [sampledColor]); + } else if (event.button == Constants.RIGHT_BUTTON) { + $.publish(Events.SELECT_SECONDARY_COLOR, [sampledColor]); } } };