Changeset 19914


Ignore:
Timestamp:
12/26/15 15:54:24 (9 years ago)
Author:
dlcheng
Message:

CHG (javascript): Correcting texture coordinates for outer radaroverlay.

File:
1 edited

Legend:

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

    r19913 r19914  
    6161        vertices.itemSize = 3;
    6262       
    63         var xrange = modelxlim[1] - modelxlim[0];
    64         var yrange = modelylim[1] - modelylim[0];
    65        
    6663        //Handle outer radaroverlay
    6764        if (md.radaroverlay) {
     
    7572                elements = [].concat(elements, newelements);
    7673               
    77                 node["translation"] = [node["translation"][0], node["translation"][1], (ArrayMax(z)) / (-1 / scale)];
     74                //Reclaculate bounds based on otuer radaroverlay
     75                modelxlim = [ArrayMin(x),ArrayMax(x)];
     76                modelylim = [ArrayMin(y),ArrayMax(y)];
     77                modelzlim = [ArrayMin(z),ArrayMax(z)];
     78                xmin = xlim[0];
     79                xmax = xlim[1];
     80                ymin = ylim[0];
     81                ymax = ylim[1];
     82                zmin = zlim[0];
     83                zmax = zlim[1];
     84               
     85                node["translation"] = [node["translation"][0], node["translation"][1], (zmax) / (-1 / scale)];
    7886        }
     87       
     88        var xrange = modelxlim[1] - modelxlim[0];
     89        var yrange = modelylim[1] - modelylim[0];
    7990       
    8091        //generate mesh:
Note: See TracChangeset for help on using the changeset viewer.