Changeset 17812


Ignore:
Timestamp:
05/09/14 16:32:25 (11 years ago)
Author:
tbretz
Message:
Allow gaps in the returned array of arrays; null is interpreted as 0 - fixed; display something if min==max
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/viewer/index.js

    r17811 r17812  
    461461{
    462462    var canv = document.getElementById("camera"+n);
     463    canv.dataRel = null;
     464
     465    if (!Array.isArray(data))
     466        return;
    463467
    464468    canv.dataAbs = new Array(1440);
     
    466470    {
    467471        var val = data[map[i]];
    468         if (!isNaN(val))
     472        if (!isNaN(val) && val!==null)
    469473            canv.dataAbs[i] = val;
    470474    }
     
    12761280        return;
    12771281
    1278     var lvl = (col-min)/(max-min);
     1282    var lvl = max==min ? 0.5 : (col-min)/(max-min);
    12791283
    12801284    ctx.fillStyle = "#"+HLStoRGB(lvl);
Note: See TracChangeset for help on using the changeset viewer.