Skip to content

Commit

Permalink
Update to version 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
malihu committed May 30, 2014
1 parent 57623f7 commit 8dc8ae6
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "malihu-custom-scrollbar-plugin",
"version": "3.0.1",
"version": "3.0.2",
"title": "malihu custom scrollbar plugin",
"description": "Highly customizable custom scrollbar jQuery plugin, featuring vertical/horizontal scrollbars, scrolling momentum, mouse-wheel, keyboard and touch support user defined callbacks etc.",
"main": "./jquery.mCustomScrollbar.js",
Expand Down
4 changes: 2 additions & 2 deletions jquery.mCustomScrollbar.concat.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jquery.mCustomScrollbar.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
== malihu jquery custom scrollbar plugin ==
Version: 3.0.1
Version: 3.0.2
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
*/

Expand Down
20 changes: 18 additions & 2 deletions jquery.mCustomScrollbar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
== malihu jquery custom scrollbar plugin ==
Version: 3.0.1
Version: 3.0.2
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
Author: malihu
Author URI: http://manos.malihu.gr
Expand Down Expand Up @@ -164,7 +164,11 @@ and dependencies (minified).
invert mouse-wheel scrolling direction
values: boolean
*/
invert:false
invert:false,
/*
the tags that disable mouse-wheel when cursor is over them
*/
disableOver:["select","option","keygen","datalist","textarea"]
},
/*
scrollbar buttons
Expand Down Expand Up @@ -1252,6 +1256,7 @@ and dependencies (minified).
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){
functions._stop($this);
if(functions._disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */
var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor<40 ? 40 : e.deltaFactor || 100;
if(o.axis==="x" || o.mouseWheel.axis==="x"){
var dir="x",
Expand Down Expand Up @@ -1283,6 +1288,17 @@ and dependencies (minified).
/* -------------------- */


/* disables mouse-wheel when hovering specific elements like select, datalist etc. */
_disableMousewheel:function(el,target){
var tag=target.nodeName.toLowerCase(),
tags=el.data(pluginPfx).opt.mouseWheel.disableOver,
/* elements that require focus */
focusTags=["select","textarea"];
return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus"));
},
/* -------------------- */


/*
DRAGGER RAIL CLICK EVENT
scrolls content via dragger rail
Expand Down
4 changes: 2 additions & 2 deletions js/minified/jquery.mCustomScrollbar.min.js

Large diffs are not rendered by default.

Binary file modified js/minified/jquery.mCustomScrollbar.min.js.gz
Binary file not shown.
20 changes: 18 additions & 2 deletions js/uncompressed/jquery.mCustomScrollbar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
== malihu jquery custom scrollbar plugin ==
Version: 3.0.1
Version: 3.0.2
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
Author: malihu
Author URI: http://manos.malihu.gr
Expand Down Expand Up @@ -164,7 +164,11 @@ and dependencies (minified).
invert mouse-wheel scrolling direction
values: boolean
*/
invert:false
invert:false,
/*
the tags that disable mouse-wheel when cursor is over them
*/
disableOver:["select","option","keygen","datalist","textarea"]
},
/*
scrollbar buttons
Expand Down Expand Up @@ -1252,6 +1256,7 @@ and dependencies (minified).
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){
functions._stop($this);
if(functions._disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */
var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor<40 ? 40 : e.deltaFactor || 100;
if(o.axis==="x" || o.mouseWheel.axis==="x"){
var dir="x",
Expand Down Expand Up @@ -1283,6 +1288,17 @@ and dependencies (minified).
/* -------------------- */


/* disables mouse-wheel when hovering specific elements like select, datalist etc. */
_disableMousewheel:function(el,target){
var tag=target.nodeName.toLowerCase(),
tags=el.data(pluginPfx).opt.mouseWheel.disableOver,
/* elements that require focus */
focusTags=["select","textarea"];
return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus"));
},
/* -------------------- */


/*
DRAGGER RAIL CLICK EVENT
scrolls content via dragger rail
Expand Down

0 comments on commit 8dc8ae6

Please sign in to comment.