binarymax / floodfill.js

HTML5 Canvas Floodfill via JavaScript
MIT License
57 stars 14 forks source link

Infinite loop at high tolerance #4

Closed Juribiyan closed 8 years ago

Juribiyan commented 8 years ago

I have noticed that when you set tolerance high enough, the application freezes. You can test it in demo, just change tolerance to 255:

floodfill(5, 5, color, canvas.getContext('2d'), star.width, star.height, 255);
binarymax commented 8 years ago

Fixed! Thanks for letting me know.