adds color ramps

This commit is contained in:
Francisco Dans 2015-08-20 08:45:19 +02:00
parent c1aeee38d6
commit c920293d65

View File

@ -405,7 +405,7 @@ var contour = require('./contour');
ctx.globalAlpha = (contourValues[c]/max)*(style["-isoline-line-opacity"] || 0.8);
}
if(grad){
ctx.strokeStyle = grad[contourValues[c]];
ctx.strokeStyle = "rgb("+grad[4*contourValues[c]+1]+","+grad[4*contourValues[c]+2]+","+grad[4*contourValues[c]+3]+")";
}
for (var y = 0; y < cellsY; y++) {
for (var x = 0; x < this.globalGrid[y].length-1; x++){