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 3.1.1 - Released 02/08/2010
[extjs.git]
/
src
/
core
/
Ext-more.js
diff --git
a/src/core/Ext-more.js
b/src/core/Ext-more.js
index
edec9d1
..
7d5ef0b
100644
(file)
--- a/
src/core/Ext-more.js
+++ b/
src/core/Ext-more.js
@@
-1,6
+1,6
@@
/*!
/*!
- * Ext JS Library 3.1.
0
- * Copyright(c) 2006-20
09
Ext JS, LLC
+ * Ext JS Library 3.1.
1
+ * Copyright(c) 2006-20
10
Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
* licensing@extjs.com
* http://www.extjs.com/license
*/
@@
-58,7
+58,7
@@
Ext.apply(Ext, function(){
* @return {Number} Value, if numeric, else defaultValue
*/
num : function(v, defaultValue){
* @return {Number} Value, if numeric, else defaultValue
*/
num : function(v, defaultValue){
- v = Number(Ext.isEmpty(v) || Ext.is
Boolean(v
) ? NaN : v);
+ v = Number(Ext.isEmpty(v) || Ext.is
Array(v) || Ext.isBoolean(v) || (Ext.isString(v) && v.trim().length == 0
) ? NaN : v);
return isNaN(v) ? defaultValue : v;
},
return isNaN(v) ? defaultValue : v;
},
@@
-332,7
+332,7
@@
ImageComponent = Ext.extend(Ext.BoxComponent, {
* @return {Number} The mean.
*/
mean : function(arr){
* @return {Number} The mean.
*/
mean : function(arr){
- return
Ext.sum(arr) / arr.length
;
+ return
arr.length > 0 ? Ext.sum(arr) / arr.length : undefined
;
},
/**
},
/**