- Timestamp:
- 04/30/14 20:22:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/viewer/index.js
r17742 r17746 272 272 function onFileSelect(event, ui) 273 273 { 274 document.getElementById("event").value = 0; 274 275 onSubmit(ui.item.value); 275 276 } … … 331 332 var canv = document.getElementById(id); 332 333 333 canv.dataAbs = [ ];334 canv.dataAbs = new Array(1440); 334 335 for (var i=0; i<1440; i++) 335 336 if (data[i]!==undefined && data[i]!==null) … … 339 340 canv.max = Math.max.apply(Math, canv.dataAbs.filter(function(e){return !isNaN(e)})); 340 341 341 canv.dataRel = [ ];342 canv.dataRel = new Array(1440); 342 343 for (var i=0; i<1440; i++) 343 344 if (data[i]!==undefined && data[i]!==null) … … 365 366 try 366 367 { 367 rc = JSON.parse(rc); 368 rc = JSON.parse(rc); 369 if (!rc) 370 return; 368 371 } 369 372 catch (e) … … 430 433 if (rc.ret!==undefined && Array.isArray(rc.ret)) 431 434 { 432 if (!Array.isArray(rc.ret[0])) 435 if (rc.ret[0] instanceof Object) 436 processCameraData("camera1", rc.ret[0]); 437 else 433 438 processCameraData("camera1", rc.ret); 434 else435 processCameraData("camera1", rc.ret[0]);436 439 437 440 if (rc.ret.length>1) … … 462 465 waveform.data = [ ]; 463 466 464 var data = [[],[],[],[]]; 467 var data = [ 468 new Array(evt.numRoi), 469 new Array(evt.numRoi), 470 new Array(evt.numRoi), 471 new Array(evt.numRoi) 472 ]; 465 473 466 474 var min = []; … … 1110 1118 } 1111 1119 1112 var positions = [ ];1120 var positions = new Array(1440); 1113 1121 1114 1122 … … 1168 1176 // ======================= Draw Legend ====================== 1169 1177 1170 var pval = canv.dataAbs[pixel].toFixed(1);1178 var pval = parseFloat(canv.dataAbs[map[pixel]]).toFixed(1); 1171 1179 var lmin = parseFloat(canv.min).toFixed(1); 1172 1180 var lmax = parseFloat(canv.max).toFixed(1);
Note:
See TracChangeset
for help on using the changeset viewer.