Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Keeping opacity in [0, 1] #623
Here's a code block (lines 5140 to 5144, i.e. inside the setFillAndStroke function)
Unhandled exception at line 5144, column 13 in raphael.js
because on that penultimate line width == -0.2898198634532889
Is it worth guarding against that by ensuring '0 <= width < 1' before 'opacity *= width'?
BTW 'width' is set on the line before the block I quoted (5139):
I need to debug my code to find out why params["stroke-width"] is being passed in as -0.3864264846043852 but that's where the negative opacity error is coming from.