Commit ddfe608e92c8c2860636cc8235c0b886c33a9c88
1 parent
4873699c
Exists in
master
and in
111 other branches
redmine #4814
Showing
1 changed file
with
8 additions
and
4 deletions
Show diff stats
js/app/models/PlotObjects/PlotPanelObject.js
... | ... | @@ -140,6 +140,8 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
140 | 140 | } |
141 | 141 | ], |
142 | 142 | |
143 | + isComponent : false, | |
144 | + | |
143 | 145 | constructor: function(){ |
144 | 146 | var me = this; |
145 | 147 | me.callParent(arguments); |
... | ... | @@ -285,9 +287,10 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
285 | 287 | |
286 | 288 | var recs = this.params().add({id : this.get('last-param-id')}); |
287 | 289 | recs[0].set('paramid', paramId); |
288 | - | |
290 | + | |
289 | 291 | if (paramComponents) { |
290 | 292 | if (paramComponents['index1']) { |
293 | + this.isComponent = true; | |
291 | 294 | recs[0].set('dim1-is-range', false); |
292 | 295 | recs[0].set('dim1-min-range', 0.); |
293 | 296 | recs[0].set('dim1-max-range', 0.); |
... | ... | @@ -310,12 +313,13 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
310 | 313 | var me = this; |
311 | 314 | amdaPlotObj.PlotObjectConfig.getParamConfig(paramId, function (success, data) { |
312 | 315 | var availableDrawingObjects = null; |
313 | - | |
316 | + | |
314 | 317 | //Change type only if the panel is empty! |
315 | 318 | if (success) { |
316 | - if (emptyPanel) | |
319 | + if (emptyPanel && !me.isComponent) | |
317 | 320 | me.changePlotType(data.panel.plotType); |
318 | - if (data.draw) { | |
321 | + | |
322 | + if (data.draw && !me.isComponent) { | |
319 | 323 | availableDrawingObjects = recs[0].getAvailableDrawingObjectByPlotType(me.get('panel-plot-type')); |
320 | 324 | |
321 | 325 | Ext.each(availableDrawingObjects, function (drawingObj) { | ... | ... |