PDA

View Full Version : Ext.slider.Multi - Thumbs doesn't work after setvalue in a specific case



shafaq.kazmi
12 Jun 2013, 1:31 AM
Hi,

I'm facing an issue in using Ext.Slider.Multi (Version: Extjs4.1.1). When I set slider max value using SetValue, slider thumbs doesn't move again. Here is my code.



var slider = Ext.create('Ext.slider.Multi', {
vertical: true,
height: 217,
width: 30,
values: [25, 500],
increment: 5,
minValue: 0,
maxValue: 100
});

Ext.create('Ext.window.Window', {
items: [slider]
}).show();

slider.setValue(0,500)



44323

Now If I move slider thumb manually, it doesn't work. It seems the issue with Z- index of from value.

Any help regarding this issue?

slemmon
13 Jun 2013, 2:46 PM
I'll bring this up with the devs to see if there's a better long-term solution for the multislider.

In the meantime you might do something like:



var slider = Ext.create('Ext.slider.Multi', {
vertical: true,
height: 217,
width: 30,
values: [25, 500],
increment: 5,
minValue: 0,
maxValue: 100
});

Ext.create('Ext.window.Window', {
items: [slider]
}).show();

var val = 500;
if (val >= slider.maxValue) {
slider.promoteThumb(slider.thumbs[0]);
}
slider.setValue(0,500)


*That's using a private method which is a use-at-your-own-risk proposition as private methods canchange between framework vers

shafaq.kazmi
18 Jun 2013, 10:25 PM
It's working fine (verified on FF/IE9/IE8/IE7). Thanks.