r2524 - spinner: width and height options default to auto to not restrict the component and allow...
Author: pazu2k@gmail.com
Date: Mon May 11 12:22:42 2009
New Revision: 2524
Modified:
branches/dev/spinner/ui/ui.spinner.js
Log:
spinner: width and height options default to auto to not restrict the
component and allow scaling. Added corrective margin height calculations to
item list height.
Modified: branches/dev/spinner/ui/ui.spinner.js
==============================================================================
--- branches/dev/spinner/ui/ui.spinner.js (original)
+++ branches/dev/spinner/ui/ui.spinner.js Mon May 11 12:22:42 2009
@@ -158,8 +158,9 @@
// Manipulate height of spinner.
this._items = this.element.children().length;
if (this._items > 1) {
- //var height = this.element.outerHeight()/this._items;
- var height = this.options.height;
+ var margins = this.element.outerHeight(true) -
this.element.outerHeight();
+ var height = this.element.outerHeight()/this._items + margins*2;
+ //var height = this.options.height;
this.element
.addClass('ui-spinner-list')
.height(height)
@@ -418,8 +419,8 @@
items: null,
max: null,
min: null,
- width:100,
- height: 24
+ width: false,
+ height: false
},
format: {
currency: function(num, sym, group, pt) {