PDA

View Full Version : Slider inicial value is not set...



dias
5 May 2010, 2:58 PM
Hello,

I have this code:



graphBottomBar = function(graph, history){
var tip = new Ext.slider.Tip({
getText: function(thumb){
return String.format('<b>{0}% Zoom</b>', thumb.value);
}
});

var sliderZoom = new Ext.Slider({
width: 200,
increment: 1,
value: 100,
minValue: 10,
maxValue: 400,
plugins: tip,
listeners:{
change: function (slider, newValue, thumb){
graph.getView().setScale(parseInt(newValue) / 100);
}
}
});

graphBottomBar.superclass.constructor.call(this,{
autoHeight: true,
style: {paddingRight: '10px'},
items: ['->',sliderZoom]
});
};

Ext.extend(graphBottomBar, Ext.Toolbar);


The problem is that i set value to 100, but slider inicializes with minvalue.

I'm using ext 3.2.1.

What i'm doing wrong!!!