Commit b4553b198b62721b9631f929712499459fc24761

Authored by Myriam Bouchemit
1 parent c0c20db1

Fix compatibility mode with histoPlot

js/app/models/PlotObjects/PlotHistogram1DSerieObject.js
... ... @@ -29,14 +29,16 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
29 29  
30 30 constructor: function(){
31 31 var me = this;
32   - if (!arguments['histo1d-yaxis']) {
33   - // Compatibility mode to support old saved requests
34   - arguments['histo1d-yaxis'] = amdaDefaultValues.plot.histogram1D.histo1DyAxis;
35   - }
36   - if (!arguments['histo1d-style']) {
37   - // Compatibility mode to support old saved requests
38   - arguments['histo1d-style'] = amdaDefaultValues.plot.histogram1D.histo1DStyle;
39   - }
  32 + if ((arguments.length > 0) && arguments[0]) {
  33 + if (!arguments[0]['histo1d-yaxis']) {
  34 + // Compatibility mode to support old saved requests
  35 + arguments[0]['histo1d-yaxis'] = amdaDefaultValues.plot.histogram1D.histo1DyAxis;
  36 + }
  37 + if (!arguments['histo1d-style']) {
  38 + // Compatibility mode to support old saved requests
  39 + arguments[0]['histo1d-style'] = amdaDefaultValues.plot.histogram1D.histo1DStyle;
  40 + }
  41 + }
40 42 me.callParent(arguments);
41 43 },
42 44  
... ...
js/app/models/PlotObjects/PlotHistogram2DSerieObject.js
... ... @@ -30,11 +30,13 @@ Ext.define('amdaPlotObj.PlotHistogram2DSerieObject', {
30 30  
31 31 constructor: function(){
32 32 var me = this;
33   - me.callParent(arguments);
34   - if (!arguments['histo2d-yaxis']) {
35   - // Compatibility mode to support old saved requests
36   - arguments['histo2d-yaxis'] = amdaDefaultValues.plot.histogram2D.histo2DyAxis;
37   - }
  33 + if ((arguments.length > 0) && arguments[0]) {
  34 + if (!arguments[0]['histo2d-yaxis']) {
  35 + // Compatibility mode to support old saved requests
  36 + arguments[0]['histo2d-yaxis'] = amdaDefaultValues.plot.histogram2D.histo2DyAxis;
  37 + }
  38 + }
  39 + me.callParent(arguments);
38 40 },
39 41  
40 42 setDefaultValues: function()
... ...