Resolve lint errors.

This commit is contained in:
Jeff Wofford 2020-05-05 18:13:43 -05:00
parent 0f5501bc3b
commit 1f887c6704
2 changed files with 16 additions and 8 deletions

View File

@ -34,6 +34,11 @@
};
ns.Outliner.prototype.replay = function (frame, replayData) {
pskl.PixelUtils.outlineSimilarConnectedPixelsFromFrame(frame, replayData.col, replayData.row, replayData.color, replayData.fillCorners);
pskl.PixelUtils.outlineSimilarConnectedPixelsFromFrame(
frame,
replayData.col,
replayData.row,
replayData.color,
replayData.fillCorners);
};
})();

View File

@ -212,11 +212,14 @@
};
var pixels = pskl.PixelUtils.getSimilarConnectedPixelsFromFrame(frame, col, row);
pixels = pixels.filter(pixel => atLeastOneNeighborHasNonTargetColor(pixel));
pixels = pixels.filter(function(pixel) {
return atLeastOneNeighborHasNonTargetColor(pixel);
});
var paintedPixels = [];
for (var pixel of pixels) {
for (var i = 0; i < pixels.length; i++) {
var pixel = pixels[i];
frame.setPixel(pixel.col, pixel.row, replacementColor);
paintedPixels.push(pixel);
}