Changeset 19839


Ignore:
Timestamp:
11/30/15 18:25:16 (9 years ago)
Author:
Eric.Larour
Message:

CHG (JAVASCRIPT): cmap option.

Location:
issm/trunk-jpl/src/m/plot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plot_unit.js

    r19826 r19839  
    108108                       
    109109                                vertices.itemSize = 3;
     110                                var cmap=options.getfieldvalue('cmap','rainbow');
    110111                                for(var i = 0; i < x.length; i++){
    111112                                        vertices[vertices.length] = x[i];
     
    114115
    115116                                        //handle mesh/qinterest size mismatch
    116                                         rgbcolor = rgb(data[i], datamin, datamax);
     117                                        rgbcolor = rgb(data[i], datamin, datamax,cmap);
    117118                                        colors[colors.length] = rgbcolor[0];
    118119                                        colors[colors.length] = rgbcolor[1];
  • issm/trunk-jpl/src/m/plot/webgl.js

    r19820 r19839  
    116116        return modelMatrix;
    117117} //}}}
    118 function rgb(value, min, max) { //{{{
     118function rgb(value, min, max,cmap) { //{{{
    119119       
    120120        var normalizedValue;
    121121                                       
    122         colorbar=colorbars["rainbow"];
     122        colorbar=colorbars[cmap];
    123123
    124124        value = clamp(value, min, max);
Note: See TracChangeset for help on using the changeset viewer.