diff --git a/js/app/models/PlotObjects/PlotPanelObject.js b/js/app/models/PlotObjects/PlotPanelObject.js index f329106..b71eb05 100644 --- a/js/app/models/PlotObjects/PlotPanelObject.js +++ b/js/app/models/PlotObjects/PlotPanelObject.js @@ -140,6 +140,8 @@ Ext.define('amdaPlotObj.PlotPanelObject', { } ], + isComponent : false, + constructor: function(){ var me = this; me.callParent(arguments); @@ -285,9 +287,10 @@ Ext.define('amdaPlotObj.PlotPanelObject', { var recs = this.params().add({id : this.get('last-param-id')}); recs[0].set('paramid', paramId); - + if (paramComponents) { if (paramComponents['index1']) { + this.isComponent = true; recs[0].set('dim1-is-range', false); recs[0].set('dim1-min-range', 0.); recs[0].set('dim1-max-range', 0.); @@ -310,12 +313,13 @@ Ext.define('amdaPlotObj.PlotPanelObject', { var me = this; amdaPlotObj.PlotObjectConfig.getParamConfig(paramId, function (success, data) { var availableDrawingObjects = null; - + //Change type only if the panel is empty! if (success) { - if (emptyPanel) + if (emptyPanel && !me.isComponent) me.changePlotType(data.panel.plotType); - if (data.draw) { + + if (data.draw && !me.isComponent) { availableDrawingObjects = recs[0].getAvailableDrawingObjectByPlotType(me.get('panel-plot-type')); Ext.each(availableDrawingObjects, function (drawingObj) { -- libgit2 0.21.2