Permalink
Browse files

added default valueMapper

  • Loading branch information...
1 parent 44a21b9 commit 8e16fa30c2cad56cdc3dcd94cc08d121175d39ee @kristianmandrup committed Jun 25, 2012
Showing with 16 additions and 2 deletions.
  1. +8 −1 SliderFieldInput.js
  2. +8 −1 SliderFieldText.js
View
@@ -10,7 +10,14 @@ Ext.define('Ext.field.SliderInput', {
config: {
cls: Ext.baseCSSPrefix + 'slider-field-input',
tabIndex: -1,
- helperPosition: 'right'
+ helperPosition: 'right',
+ valueMapper: function(value) {
+ if (self.config.valueMap) {
+ self.config.valueMap[value];
+ } else {
+ value;
+ }
+ }
},
proxyConfig: {
View
@@ -9,7 +9,14 @@ Ext.define('Ext.field.SliderText', {
config: {
cls: Ext.baseCSSPrefix + 'slider-field-text',
tabIndex: -1,
- helperPosition: 'right'
+ helperPosition: 'right',
+ valueMapper: function(value) {
+ if (self.config.valueMap) {
+ self.config.valueMap[value];
+ } else {
+ value;
+ }
+ }
},
proxyConfig: {

0 comments on commit 8e16fa3

Please sign in to comment.