Ignore:
Timestamp:
06/09/12 21:54:08 (13 years ago)
Author:
tbretz
Message:
Changed the seperator for rows from \0 to \x7f. In this way we can just scale the data by 126 and do not need to add or subtract 1.
File:
1 edited

Legend:

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

    r14137 r14138  
    11191119        return HLStoRGB(0);
    11201120
    1121     var hue = (col-1)/127;
     1121    var hue = col/126;
    11221122    return HLStoRGB(hue);
    11231123}
     
    13671367
    13681368        ctx.beginPath();
    1369         ctx.moveTo(ml, ch-mb-(data[j].charCodeAt(0)-1)/126*h);
     1369        ctx.moveTo(ml, ch-mb-data[j].charCodeAt(0)/126*h);
    13701370        for (var i=1; i<data[j].length; i++)
    1371             ctx.lineTo(ml+w/(data[j].length-1)*i, ch-mb-(data[j].charCodeAt(i)-1)/126*h);
     1371            ctx.lineTo(ml+w/(data[j].length-1)*i, ch-mb-data[j].charCodeAt(i)/126*h);
    13721372
    13731373        // --- finalize data ---
     
    15231523    ctx.clearRect(0, 0, canv.width, canv.height);
    15241524
    1525     var data = result.split('\0');
     1525    var data = result.split('\x7f');
    15261526    if (data.length<2)
    15271527        return;
Note: See TracChangeset for help on using the changeset viewer.