git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git]
/
examples
/
ux
/
layout
/
Center.js
diff --git
a/examples/ux/layout/Center.js
b/examples/ux/layout/Center.js
index
3f826e5
..
e904fc5
100644
(file)
--- a/
examples/ux/layout/Center.js
+++ b/
examples/ux/layout/Center.js
@@
-52,11
+52,11
@@
var p = Ext.create('Ext.Panel', {
Ext.define('Ext.ux.layout.Center', {
extend: 'Ext.layout.container.Fit',
alias: 'layout.ux.center',
Ext.define('Ext.ux.layout.Center', {
extend: 'Ext.layout.container.Fit',
alias: 'layout.ux.center',
-
// private
- setItemSize : function(item, width, height){
+ // private
+ setItemSize : function(item, width, height)
{
this.owner.addCls('ux-layout-center');
item.addCls('ux-layout-center-item');
this.owner.addCls('ux-layout-center');
item.addCls('ux-layout-center-item');
- if
(item &&
height > 0) {
+ if
(
height > 0) {
if (width) {
width = item.width;
if (Ext.isNumber(item.widthRatio)) {
if (width) {
width = item.width;
if (Ext.isNumber(item.widthRatio)) {
@@
-64,6
+64,7
@@
Ext.define('Ext.ux.layout.Center', {
}
}
item.setSize(width, height);
}
}
item.setSize(width, height);
+ item.margins.left = Math.round((this.owner.el.getWidth() - width) * 0.5);
}
}
}
}