pa7/heatmap.js — pull request #131 by iernie (2014-08-26 10:36:25+00:00)
Title: Fix custom radius being zero in some cases

I was getting a DOMException when defining custom radius for each point in Safari or Mobile Safari.

```javascript
DOMException
code: 11
constructor: DOMExceptionConstructor
line: 407
message: "INVALID_STATE_ERR: DOM Exception 11"
name: "INVALID_STATE_ERR"
sourceId: 2131884000
sourceURL: "http://localhost:51612/app/libs/heatmapjs/build/heatmap.js"
__proto__: DOMExceptionPrototype
```

I managed to track it down to this line in the code
```javascript
tplCanvas.width = tplCanvas.height = radius*2;
```

The problem was that that Safari and Mobile Safari does not like when the canvas gets a width or height of value 0, which was possible when the value was a decimal like for example 0.4 which was floored to 0. I fixed this by ceiling the value and adding a last fail-safe checking if the value is 0 and then setting it to 1.