You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for developing this component. We are using it in a old project, and it seems that the "official" scrollwheel patch doesn't work. This is the code on sencha forums to be able to use the mouse scrollwheel when on desktop. It works with the rest of lists and pickers, but not with yours. Do you know how can we solve it? Thanks!!
if (Ext.os.is.Desktop)
{
// Native scrolling in Browser
document.addEventListener('mousewheel', function(e){
var el = e.target;
var offset, scroller, _results;
_results = [];
while (el !== document.body) {
if (el && el.className && el.className.indexOf('x-container') >= 0) {
var cmp = Ext.getCmp(el.id);
if (cmp && typeof cmp.getScrollable == 'function' && cmp.getScrollable()){
var scroller = cmp.getScrollable().getScroller();
if (scroller) {
var offset = {x:0, y: -e.wheelDelta*0.5};
scroller.fireEvent('scrollstart', scroller, scroller.position.x, scroller.position.y, e);
scroller.scrollBy(offset.x, offset.y);
scroller.snapToBoundary();
scroller.fireEvent('scrollend', scroller, scroller.position.x, scroller.position.y-offset.y);
break;
}
}
}
_results.push(el = el.parentNode);
}
return _results;
}, false);
}
The text was updated successfully, but these errors were encountered:
Hi, thanks for developing this component. We are using it in a old project, and it seems that the "official" scrollwheel patch doesn't work. This is the code on sencha forums to be able to use the mouse scrollwheel when on desktop. It works with the rest of lists and pickers, but not with yours. Do you know how can we solve it? Thanks!!
if (Ext.os.is.Desktop)
{
// Native scrolling in Browser
document.addEventListener('mousewheel', function(e){
var el = e.target;
var offset, scroller, _results;
_results = [];
while (el !== document.body) {
if (el && el.className && el.className.indexOf('x-container') >= 0) {
var cmp = Ext.getCmp(el.id);
if (cmp && typeof cmp.getScrollable == 'function' && cmp.getScrollable()){
var scroller = cmp.getScrollable().getScroller();
if (scroller) {
var offset = {x:0, y: -e.wheelDelta*0.5};
scroller.fireEvent('scrollstart', scroller, scroller.position.x, scroller.position.y, e);
scroller.scrollBy(offset.x, offset.y);
scroller.snapToBoundary();
scroller.fireEvent('scrollend', scroller, scroller.position.x, scroller.position.y-offset.y);
break;
}
}
}
_results.push(el = el.parentNode);
}
return _results;
}, false);
}
The text was updated successfully, but these errors were encountered: