chrisdavies/primepattern — pull request #2 by tdhsmith (2014-11-11 18:09:55+00:00)
Title: Limit canvas height to prevent non-rendering

[Most browsers have a limit for canvas size](http://stackoverflow.com/a/11585939/3697161), beyond which rendering and drawing simply fail quietly. Due to the size of the dataset, it's easy to overrun the maximum height by choosing a small modulus. (On the 1st million, I can't go below 473.)

This limits the height to the maximum canvas size for Chrome/FF/Safari (apparently IE has a lower limit, but continues to render and crops the output, so it's a moot point there).

You can still set a width beyond 32767, but that seemed like a less sane user input and the solution was less clear to address.