Inside Thumb.js
, there is a method called sendToBack()
which returns the thumb of the slider back to a z-index of 0. It seems like this should be in the onDragEnd
method of the Slider
class, but alas!
I basically added it myself by using a dragend
event listener:
Ext.create('Ext.slider.Single',
{
width: 250,
value: 10,
...
listeners:
{
...,
dragend: function(slider, e, eOpts){
if(slider && slider.thumbs && slider.thumbs.length === 1){
slider.thumbs[0].sendToBack();
}
}
}
})
The key here was slider.thumbs[0].sendToBack()