update components
This commit is contained in:
parent
e305bf40c8
commit
b4f87ddb3a
8 changed files with 52 additions and 36 deletions
|
@ -974,13 +974,13 @@ define(['browser', 'layoutManager', 'scrollStyles'], function (browser, layoutMa
|
|||
|
||||
if (!transform) {
|
||||
if (o.horizontal) {
|
||||
if (layoutManager.desktop && o.hiddenScroll === false) {
|
||||
if (layoutManager.desktop) {
|
||||
slideeElement.classList.add('smoothScrollX');
|
||||
} else {
|
||||
slideeElement.classList.add('hiddenScrollX');
|
||||
}
|
||||
} else {
|
||||
if (layoutManager.desktop && o.hiddenScroll === false) {
|
||||
if (layoutManager.desktop) {
|
||||
slideeElement.classList.add('smoothScrollY');
|
||||
} else {
|
||||
slideeElement.classList.add('hiddenScrollY');
|
||||
|
@ -990,9 +990,6 @@ define(['browser', 'layoutManager', 'scrollStyles'], function (browser, layoutMa
|
|||
slideeElement.style['will-change'] = 'transform';
|
||||
}
|
||||
|
||||
// Scrolling navigation
|
||||
scrollSource.addEventListener(wheelEvent, scrollHandler);
|
||||
|
||||
if (transform) {
|
||||
dragInitEventNames.forEach(function (eventName) {
|
||||
dragSourceElement.addEventListener(eventName, dragInitSlidee);
|
||||
|
@ -1007,6 +1004,16 @@ define(['browser', 'layoutManager', 'scrollStyles'], function (browser, layoutMa
|
|||
passive: true
|
||||
});
|
||||
}
|
||||
|
||||
// Scrolling navigation
|
||||
scrollSource.addEventListener(wheelEvent, scrollHandler);
|
||||
|
||||
} else if (o.horizontal) {
|
||||
|
||||
// Don't bind to mouse events with vertical scroll since the mouse wheel can handle this natively
|
||||
|
||||
// Scrolling navigation
|
||||
scrollSource.addEventListener(wheelEvent, scrollHandler);
|
||||
}
|
||||
|
||||
// Mark instance as initialized
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue