PDA

View Full Version : Slider first tap and setValue



rozz
24 Jun 2011, 1:55 AM
Hi,
i'm trying to use the slider component but i have the follow problem:
when i click on slidebar for the first time i can't get the value clicked and i can't setValue of the thumb.
If i rotate the ipad (or resize the browser window) then the component
works ok. Which is the possible issue?

thanks



slider = new Ext.form.Slider(
{
xtype : 'sliderfield',
id:'slider',
value : 14,
minValue: 0,
maxValue: maxValueSlider,
dock: 'bottom',
listeners:
{
click:
{
element: 'el',
fn: function(event,item,object_prototype)
{
var tmp=this.getValue();
var tmp2=Ext.getCmp('slider').getValue();
if (isNaN(tmp2))
{
tmp2=15;
Ext.getCmp('slider').setValue(tmp2);
console.log('***********CHANGE AND SET*****('+tmp2+')****');
}
carousel.setActiveItem(tmp2);
console.log('***********CHANGE*****('+tmp2+')****');
}
}
}

});