Commit e13ef0688325009c816476a457e38fffccfbc73a

Authored by Benjamin Renard
1 parent 8b77c7d0

Compute window height in show event of ParamArgumentsPlug

Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
js/app/views/ParamArgumentsPlug.js
@@ -59,7 +59,9 @@ Ext.define('amdaUI.ParamArgumentsPlug', { @@ -59,7 +59,9 @@ Ext.define('amdaUI.ParamArgumentsPlug', {
59 /** 59 /**
60 * creation of the window 60 * creation of the window
61 */ 61 */
62 - show : function(prefixId, paramRequestObject) { 62 + show : function(prefixId, paramRequestObject) {
  63 + var me = this;
  64 +
63 if (!this.win) 65 if (!this.win)
64 { 66 {
65 this.win = new Ext.Window({ 67 this.win = new Ext.Window({
@@ -82,7 +84,10 @@ Ext.define('amdaUI.ParamArgumentsPlug', { @@ -82,7 +84,10 @@ Ext.define('amdaUI.ParamArgumentsPlug', {
82 beforeclose: function() { 84 beforeclose: function() {
83 this.hostCmp.setDisabled(false); 85 this.hostCmp.setDisabled(false);
84 Ext.PluginManager.unregister(this); 86 Ext.PluginManager.unregister(this);
85 - } 87 + } ,
  88 + show: function() {
  89 + me.win.setHeight(me.computeHeight());
  90 + }
86 }, 91 },
87 getConstrainVector: function(constrainTo){ 92 getConstrainVector: function(constrainTo){
88 var me = this; 93 var me = this;
@@ -103,7 +108,6 @@ Ext.define('amdaUI.ParamArgumentsPlug', { @@ -103,7 +108,6 @@ Ext.define('amdaUI.ParamArgumentsPlug', {
103 //Work with a clone of the request para object. 108 //Work with a clone of the request para object.
104 this.paramObject = paramRequestObject; 109 this.paramObject = paramRequestObject;
105 var workingParamObject = this.paramObject.copy(); 110 var workingParamObject = this.paramObject.copy();
106 - var me = this;  
107 this.paramArgs.editParameter(workingParamObject, this.hostCmp, function() { 111 this.paramArgs.editParameter(workingParamObject, this.hostCmp, function() {
108 me.win.setHeight(me.computeHeight()); 112 me.win.setHeight(me.computeHeight());
109 }); 113 });