Commit 8da6a7cb07bc2e716c57f61abbc1f1c5c9724027

Authored by Benjamin Renard
1 parent 43ec9f7a

Improve Z axis coordinate preview

Showing 1 changed file with 9 additions and 7 deletions   Show diff stats
js/app/views/PlotTabResultUI.js
... ... @@ -266,11 +266,11 @@ Ext.define('amdaUI.PlotTabResultUI', {
266 266  
267 267 // Creating the value scale
268 268 var interval = (axis.max - axis.min) / ( colorListArray.length- 1);
269   - valuesListArray = new Array(colorListArray.length+1);
  269 + valuesListArray = new Array(colorListArray.length);
270 270  
271   - for(var i=0;i< colorListArray.length+1; i++)
  271 + for(var i=0;i< colorListArray.length; i++)
272 272 valuesListArray[i] = axis.min + i * interval;
273   -
  273 +
274 274 // Computation of the closest r,g,b values to the cursorColor
275 275 lowestChi = new Array(2);
276 276 for(var i=0;i< colorListArray.length; i++){
... ... @@ -285,10 +285,12 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
285 285 }
286 286  
287 287 // Returning values
288   -
289   - if(axis.logarithmic)
290   - return "[1e"+valuesListArray[lowestChi[0]].toFixed(3)+",1e"+valuesListArray[lowestChi[0]+1].toFixed(4)+"]";
291   - return "["+valuesListArray[lowestChi[0]].toFixed(4)+","+valuesListArray[lowestChi[0]+1].toFixed(4)+"]";
  288 + if (lowestChi[0] == 0)
  289 + return "<= "+(axis.logarithmic ? "1e" : "")+valuesListArray[lowestChi[0]+1].toFixed(3);
  290 + else if (lowestChi[0] == colorListArray.length- 1)
  291 + return ">= "+(axis.logarithmic ? "1e" : "")+valuesListArray[lowestChi[0]-1].toFixed(3);
  292 + else
  293 + return "~ "+(axis.logarithmic ? "1e" : "")+valuesListArray[lowestChi[0]].toFixed(3);
292 294 }
293 295 return "";
294 296 },
... ...