Форк Rambox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1005 B

/** */
Ext.define('Ext.aria.slider.Thumb', {
override: 'Ext.slider.Thumb',
move: function(v, animate) {
var me = this,
el = me.el,
slider = me.slider,
styleProp = slider.vertical ? 'bottom' : slider.horizontalProp,
to,
from;
v += '%';
if (!animate) {
el.dom.style[styleProp] = v;
slider.fireEvent('move', slider, v, me);
}
else {
to = {};
to[styleProp] = v;
if (!Ext.supports.GetPositionPercentage) {
from = {};
from[styleProp] = el.dom.style[styleProp];
}
new Ext.fx.Anim({
target: el,
duration: 350,
from: from,
to: to,
callback: function() {
slider.fireEvent('move', slider, v, me);
}
});
}
}
});