ItemSelector.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. This file is part of Ext JS 4
  3. Copyright (c) 2011 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  7. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
  8. */
  9. /**
  10. * @private
  11. * @class Ext.ux.layout.component.form.ItemSelector
  12. * @extends Ext.layout.component.field.Field
  13. * Layout class for {@link Ext.ux.form.ItemSelector} fields.
  14. * @private
  15. */
  16. Ext.define('Ext.ux.layout.component.form.ItemSelector', {
  17. extend: 'Ext.layout.component.field.Field',
  18. alias: ['layout.itemselectorfield'],
  19. type: 'itemselectorfield',
  20. /**
  21. * @cfg {Number} height The height of the field. Defaults to 200.
  22. */
  23. defaultHeight: 200,
  24. sizeBodyContents: function(width, height) {
  25. var me = this;
  26. if (!Ext.isNumber(height)) {
  27. height = me.defaultHeight;
  28. }
  29. me.owner.innerCt.setSize(width, height);
  30. }
  31. });