Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions simpleheat.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ simpleheat.prototype = {
}

// colorize the heatmap, using opacity value of each pixel to get the right color from our gradient
//some time,the canvas's width and height may be zero
if(this._width==0||this._height==0){
this.resize();
}
var colored = ctx.getImageData(0, 0, this._width, this._height);
this._colorize(colored.data, this._grad);
ctx.putImageData(colored, 0, 0);
Expand Down