PDA

View Full Version : BasicDialog.center() does not work



schmidetzki
9 Feb 2007, 3:26 PM
A look into the code showes:

center : function(){
this.moveTo(this.el.getCenterXY(true));
return this;
}
However this.moveTo() expects x and y as parameter instead on an array [x,y] (as returned by el.getCenterXY())

This could/should be corrected as followes:

center : function(){
var pos=this.el.getCenterXY(true);
this.moveTo(pos[0], pos[1]);
}

Animal
10 Feb 2007, 12:22 AM
or



center : function(){
return this.moveTo.apply(this, this.el.getCenterXY(true));
}