Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #38 from g0t00/master
Browse files Browse the repository at this point in the history
fixed scrollhandling in firefox and for horizontal scrolling
  • Loading branch information
basti1253 committed Apr 17, 2017
2 parents 7124ebb + 45bae07 commit da59b7c
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 27 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Expand Up @@ -6,3 +6,4 @@ Sebastian Sauer <info@dynpages.de>
Brandon Belvin <brandon.belvin@gmail.com> Brandon Belvin <brandon.belvin@gmail.com>
April Barrett April Barrett
Kirill Kostko <kirill.kostko@gmail.com> Kirill Kostko <kirill.kostko@gmail.com>
Anton Schulte <mail@anton.schulte.de>
1 change: 1 addition & 0 deletions dist/AUTHORS.txt
Expand Up @@ -6,3 +6,4 @@ Sebastian Sauer <info@dynpages.de>
Brandon Belvin <brandon.belvin@gmail.com> Brandon Belvin <brandon.belvin@gmail.com>
April Barrett April Barrett
Kirill Kostko <kirill.kostko@gmail.com> Kirill Kostko <kirill.kostko@gmail.com>
Anton Schulte <mail@anton.schulte.de>
4 changes: 2 additions & 2 deletions dist/coverflow.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 15 additions & 6 deletions dist/coverflow.js
@@ -1,5 +1,5 @@
/*! CoverflowJS - v3.0.2 - 2015-12-31 /*! CoverflowJS - v3.0.2 - 2017-04-17
* Copyright (c) 2015 Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko; Licensed MIT */ * Copyright (c) 2017 Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko, Anton Schulte; Licensed MIT */
/*! jQuery UI - v1.10.4 - 2014-01-17 /*! jQuery UI - v1.10.4 - 2014-01-17
* http://jqueryui.com * http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.effect.js * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.effect.js
Expand Down Expand Up @@ -3296,14 +3296,23 @@ $.extend( $.coverflow.renderer, {
ev.preventDefault(); ev.preventDefault();
}, },
_onMouseWheel : function ( ev ) { _onMouseWheel : function ( ev ) {
var origEv = ev.originalEvent, var origEv = ev.originalEvent, delta;
if (typeof origEv.deltaMode !== 'undefined') {
delta = Math.abs(origEv.deltaX) > Math.abs(origEv.deltaY) ? -origEv.deltaX : -origEv.deltaY;
// mac os specific - fighting trackpad clumsy scrolling behaviour
if (origEv.deltaMode === window.WheelEvent.DOM_DELTA_PIXEL && delta > -10 && delta < 3) {
return;
}
} else {
delta = Math.abs(origEv.wheelDelta) > 0 ? origEv.wheelDelta : -origEv.detail; delta = Math.abs(origEv.wheelDelta) > 0 ? origEv.wheelDelta : -origEv.detail;


// mac os specific - fighting trackpad clumsy scrolling behaviour // mac os specific - fighting trackpad clumsy scrolling behaviour
if( delta > -10 && delta < 3 ) { if( delta > -10 && delta < 3 ) {
return; return;
}
} }



if( delta > 0 ) { if( delta > 0 ) {
this.prev(); this.prev();
return; return;
Expand Down
7 changes: 3 additions & 4 deletions dist/coverflow.min.js

Large diffs are not rendered by default.

21 changes: 15 additions & 6 deletions dist/coverflow.standalone.js
@@ -1,5 +1,5 @@
/*! CoverflowJS - v3.0.2 - 2015-12-31 /*! CoverflowJS - v3.0.2 - 2017-04-17
* Copyright (c) 2015 Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko; Licensed MIT */ * Copyright (c) 2017 Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko, Anton Schulte; Licensed MIT */
(function( $, window, document, undefined ) { (function( $, window, document, undefined ) {


$.coverflow = { $.coverflow = {
Expand Down Expand Up @@ -1189,14 +1189,23 @@ $.extend( $.coverflow.renderer, {
ev.preventDefault(); ev.preventDefault();
}, },
_onMouseWheel : function ( ev ) { _onMouseWheel : function ( ev ) {
var origEv = ev.originalEvent, var origEv = ev.originalEvent, delta;
if (typeof origEv.deltaMode !== 'undefined') {
delta = Math.abs(origEv.deltaX) > Math.abs(origEv.deltaY) ? -origEv.deltaX : -origEv.deltaY;
// mac os specific - fighting trackpad clumsy scrolling behaviour
if (origEv.deltaMode === window.WheelEvent.DOM_DELTA_PIXEL && delta > -10 && delta < 3) {
return;
}
} else {
delta = Math.abs(origEv.wheelDelta) > 0 ? origEv.wheelDelta : -origEv.detail; delta = Math.abs(origEv.wheelDelta) > 0 ? origEv.wheelDelta : -origEv.detail;


// mac os specific - fighting trackpad clumsy scrolling behaviour // mac os specific - fighting trackpad clumsy scrolling behaviour
if( delta > -10 && delta < 3 ) { if( delta > -10 && delta < 3 ) {
return; return;
}
} }



if( delta > 0 ) { if( delta > 0 ) {
this.prev(); this.prev();
return; return;
Expand Down
6 changes: 3 additions & 3 deletions dist/coverflow.standalone.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/package.json
Expand Up @@ -4,7 +4,7 @@
"description": "A jQuery UI powered coverflow component that takes advantage of CSS3 features", "description": "A jQuery UI powered coverflow component that takes advantage of CSS3 features",
"version": "3.0.2", "version": "3.0.2",
"author": { "author": {
"name": "Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko", "name": "Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko, Anton Schulte",
"url": "https://github.com/coverflowjs/coverflow" "url": "https://github.com/coverflowjs/coverflow"
}, },
"maintainers": [ "maintainers": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -4,7 +4,7 @@
"description": "A jQuery UI powered coverflow component that takes advantage of CSS3 features", "description": "A jQuery UI powered coverflow component that takes advantage of CSS3 features",
"version": "3.0.2", "version": "3.0.2",
"author": { "author": {
"name": "Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko", "name": "Paul Baukus, Addy Osmani, Sebastian Sauer, Brandon Belvin, April Barrett, Kirill Kostko, Anton Schulte",
"url": "https://github.com/coverflowjs/coverflow" "url": "https://github.com/coverflowjs/coverflow"
}, },
"maintainers": [ "maintainers": [
Expand Down
17 changes: 13 additions & 4 deletions src/js/coverflow.js
Expand Up @@ -582,14 +582,23 @@
ev.preventDefault(); ev.preventDefault();
}, },
_onMouseWheel : function ( ev ) { _onMouseWheel : function ( ev ) {
var origEv = ev.originalEvent, var origEv = ev.originalEvent, delta;
if (typeof origEv.deltaMode !== 'undefined') {
delta = Math.abs(origEv.deltaX) > Math.abs(origEv.deltaY) ? -origEv.deltaX : -origEv.deltaY;
// mac os specific - fighting trackpad clumsy scrolling behaviour
if (origEv.deltaMode === window.WheelEvent.DOM_DELTA_PIXEL && delta > -10 && delta < 3) {
return;
}
} else {
delta = Math.abs(origEv.wheelDelta) > 0 ? origEv.wheelDelta : -origEv.detail; delta = Math.abs(origEv.wheelDelta) > 0 ? origEv.wheelDelta : -origEv.detail;


// mac os specific - fighting trackpad clumsy scrolling behaviour // mac os specific - fighting trackpad clumsy scrolling behaviour
if( delta > -10 && delta < 3 ) { if( delta > -10 && delta < 3 ) {
return; return;
}
} }



if( delta > 0 ) { if( delta > 0 ) {
this.prev(); this.prev();
return; return;
Expand Down

0 comments on commit da59b7c

Please sign in to comment.