X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/docs/source/Ext-more.html diff --git a/docs/source/Ext-more.html b/docs/source/Ext-more.html index 099cf7c1..4f21c015 100644 --- a/docs/source/Ext-more.html +++ b/docs/source/Ext-more.html @@ -6,7 +6,7 @@ -
/**
+    
/** * @class Ext */ @@ -60,7 +60,7 @@ Ext.apply(Ext, function(){ * @return {Number} Value, if numeric, else defaultValue */ num : function(v, defaultValue){ - v = Number(Ext.isEmpty(v) || Ext.isBoolean(v) ? NaN : v); + v = Number(Ext.isEmpty(v) || Ext.isArray(v) || Ext.isBoolean(v) || (Ext.isString(v) && v.trim().length == 0) ? NaN : v); return isNaN(v) ? defaultValue : v; }, @@ -334,7 +334,7 @@ ImageComponent = Ext.extend(Ext.BoxComponent, { * @return {Number} The mean. */ mean : function(arr){ - return Ext.sum(arr) / arr.length; + return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined; },
/** @@ -545,7 +545,7 @@ Ext.zip( }; }()); -/** +
/** * @class Function * These functions are available on every Function object (any JavaScript function). */ @@ -585,7 +585,7 @@ sayGoodbye('Fred'); // both alerts show }); -/** +
/** * @class String * These functions are available as static methods on the JavaScript String object. */