jledet / waterfall

HTML Canvas Waterfall Plot
MIT License
87 stars 27 forks source link

Fix error when spectrum height is 0 #1

Closed AndersKaloer closed 5 years ago

AndersKaloer commented 5 years ago

Pressing "w" until spectrum height is 0 causes CanvasRenderingContext2D.drawImage() to fail with an unrecoverable error.

This pull request solves the problem.

jledet commented 5 years ago

Thanks. Should be fixed as part of 3dc1e893f39b6aed271fc713678b5d4eb160e1b9 pushed 2 minutes after your PR :)

AndersKaloer commented 5 years ago

At least I was first :)