From a646f922d4e1a0235b704a0d56a388aa1a5141bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 14 Nov 2012 12:06:41 -0800 Subject: [PATCH] Convert values of numeric items to numbers. --- src/ui/Component.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/Component.js b/src/ui/Component.js index bf32c07e..56a5d459 100644 --- a/src/ui/Component.js +++ b/src/ui/Component.js @@ -28,7 +28,8 @@ var Component = this.Component = Base.extend(Callback, /** @lends Component# */{ }, number: { - type: 'number' + type: 'number', + number: true }, button: { @@ -81,6 +82,8 @@ var Component = this.Component = Base.extend(Callback, /** @lends Component# */{ if (typeof key === 'function') key = null; var value = DomElement.get(this, key || 'value'); + if (that._info.number) + value = Base.toFloat(value); if (fireChange) { that.palette.fire('change', that, that.name, value); that.fire('change', value);