fills grid with nulls instead of zeroes
This commit is contained in:
parent
1696e524c1
commit
642f1c2a1d
13
Makefile
13
Makefile
@ -9,20 +9,10 @@ JS_CLIENT_FILES= lib/torque/*.js \
|
||||
lib/torque/leaflet/canvas_layer.js \
|
||||
lib/torque/leaflet/torque.js
|
||||
|
||||
all: dist/torque.js dist/torque.full.js add-header
|
||||
|
||||
dist/torque.full.uncompressed.js: dist_folder dist/torque.uncompressed.js
|
||||
$(BROWSERIFY) lib/torque/index.js --standalone torque > dist/torque.full.uncompressed.js
|
||||
|
||||
dist/torque.full.js: dist_folder dist/torque.full.uncompressed.js
|
||||
$(UGLIFYJS) dist/torque.full.uncompressed.js > dist/torque.full.js
|
||||
|
||||
dist/torque.uncompressed.js: dist_folder $(JS_CLIENT_FILES)
|
||||
$(BROWSERIFY) lib/torque/index.js --no-bundle-external --standalone torque > dist/torque.uncompressed.js
|
||||
|
||||
dist/torque.js: dist_folder dist/torque.uncompressed.js
|
||||
$(UGLIFYJS) dist/torque.uncompressed.js > dist/torque.js
|
||||
|
||||
dist_folder:
|
||||
mkdir -p dist
|
||||
|
||||
@ -31,9 +21,6 @@ dist: dist_folder dist/torque.js
|
||||
clean-results:
|
||||
-@rm test/results/*.png
|
||||
|
||||
add-header:
|
||||
node lib/header.js
|
||||
|
||||
prepare-test-suite:
|
||||
browserify test/suite.js > test/suite-bundle.js
|
||||
|
||||
|
@ -233,9 +233,9 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
this.renderer.firstTileCoords = {coord: this._tiles[min.k].coord, pos:this.getTilePos(this._tiles[min.k].coord)};
|
||||
|
||||
var valsPerTile = 256/this.options.resolution;
|
||||
this.renderer.globalGrid = Array.apply(null, Array(this.renderer.tileDimensions.h * valsPerTile)).map(Number.prototype.valueOf,0);
|
||||
this.renderer.globalGrid = new Array(this.renderer.tileDimensions.h * valsPerTile).fill(null);
|
||||
for (var i = 0; i < this.renderer.globalGrid.length; i++){
|
||||
this.renderer.globalGrid[i] = Array.apply(null, Array(this.renderer.tileDimensions.w * valsPerTile)).map(Number.prototype.valueOf,0);
|
||||
this.renderer.globalGrid[i] = new Array(this.renderer.tileDimensions.w * valsPerTile).fill(null);
|
||||
}
|
||||
}
|
||||
for(t in this._tiles) {
|
||||
|
@ -483,11 +483,11 @@ torque.extend(IsoRenderer.prototype, torque.Event, {
|
||||
var contourValues = this.contourValues;
|
||||
for (var c = 0; c < this.lines.length; c++){
|
||||
var thisContour = this.lines[c];
|
||||
if(style["-isoline-line-decay"]){
|
||||
if (style["-isoline-line-decay"]){
|
||||
var max = contourValues[contourValues.length - 1];
|
||||
ctx.globalAlpha = (contourValues[c]/max)*(style["-isoline-line-opacity"] || 0.8);
|
||||
}
|
||||
if(grad){
|
||||
if (grad){
|
||||
ctx.strokeStyle = "rgb("+grad[4*contourValues[c]]+","+grad[4*contourValues[c]+1]+","+grad[4*contourValues[c]+2]+")";
|
||||
ctx.fillStyle = "rgb("+grad[4*contourValues[c]]+","+grad[4*contourValues[c]+1]+","+grad[4*contourValues[c]+2]+")";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user