Changeset 17811 for trunk/FACT++/www
- Timestamp:
- 05/08/14 19:45:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/viewer/index.js
r17810 r17811 440 440 var data = canv.dataAbs; 441 441 for (var i=0; i<1440; i++) 442 if (data[i]!==undefined && data[i]!==null)442 if (data[i]!==undefined/* && data[i]!==null*/) 443 443 { 444 444 var ix = parseInt((data[i]-xmin)/step); … … 466 466 { 467 467 var val = data[map[i]]; 468 if ( val!==undefined && val!==null)468 if (!isNaN(val)) 469 469 canv.dataAbs[i] = val; 470 470 } 471 471 472 canv.min = Math.min.apply(Math, canv.dataAbs.filter(function(e){return !isNaN(e)}));473 canv.max = Math.max.apply(Math, canv.dataAbs.filter(function(e){return !isNaN(e)}));472 canv.min = Math.min.apply(Math, canv.dataAbs.filter(function(e){return e!==undefined;})); 473 canv.max = Math.max.apply(Math, canv.dataAbs.filter(function(e){return e!==undefined;})); 474 474 475 475 canv.dataRel = new Array(1440); 476 476 for (var i=0; i<1440; i++) 477 477 { 478 va l = data[map[i]];479 if (val!==undefined && val!==null)478 var val = canv.dataAbs[i]; 479 if (val!==undefined) 480 480 canv.dataRel[i] = (val-canv.min)/canv.max; 481 481 } … … 500 500 drawHist(n); 501 501 } 502 503 502 504 503 function onDataReceived(rc) … … 1274 1273 function drawHex(ctx, x, y, col, min, max) 1275 1274 { 1276 if (col===undefined || col===null|| max<min)1275 if (col===undefined/* || col===null*/ || max<min) 1277 1276 return; 1278 1277
Note:
See TracChangeset
for help on using the changeset viewer.