update components
This commit is contained in:
parent
f4fb963fab
commit
484e60e328
23 changed files with 494 additions and 218 deletions
|
@ -9,8 +9,14 @@ if (s.params.mousewheelControl) {
|
|||
try {
|
||||
new window.WheelEvent('wheel');
|
||||
s.mousewheel.event = 'wheel';
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
if (window.WheelEvent || (s.container[0] && 'wheel' in s.container[0])) {
|
||||
s.mousewheel.event = 'wheel';
|
||||
}
|
||||
}
|
||||
if (!s.mousewheel.event && window.WheelEvent) {
|
||||
|
||||
}
|
||||
if (!s.mousewheel.event && document.onmousewheel !== undefined) {
|
||||
s.mousewheel.event = 'mousewheel';
|
||||
}
|
||||
|
@ -23,10 +29,9 @@ function handleMousewheel(e) {
|
|||
var we = s.mousewheel.event;
|
||||
var delta = 0;
|
||||
var rtlFactor = s.rtl ? -1 : 1;
|
||||
//Opera & IE
|
||||
if (e.detail) delta = -e.detail;
|
||||
|
||||
//WebKits
|
||||
else if (we === 'mousewheel') {
|
||||
if (we === 'mousewheel') {
|
||||
if (s.params.mousewheelForceToAxis) {
|
||||
if (s.isHorizontal()) {
|
||||
if (Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY)) delta = e.wheelDeltaX * rtlFactor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue