diff --git a/index.html b/index.html
index 042c854..1a6dfc2 100644
--- a/index.html
+++ b/index.html
@@ -263,6 +263,14 @@
|
Boolean |
+
+
+ horizMouseScroll |
+
+ true |
+
+ Indicates whether mousescroll controls the horizontal scrolling of the chart. |
+
diff --git a/js/jquery.fn.gantt.js b/js/jquery.fn.gantt.js
index c59cb63..0ecb7fe 100644
--- a/js/jquery.fn.gantt.js
+++ b/js/jquery.fn.gantt.js
@@ -183,6 +183,7 @@
// navigation
navigate: "buttons",
scrollToToday: true,
+ horizMouseScroll: true,
// cookie options
useCookie: false,
cookieKey: "jquery.fn.gantt",
@@ -360,10 +361,12 @@
var dataPanel = $('
');
// Handle mousewheel events for scrolling the data panel
- var wheel = 'onwheel' in element ?
- 'wheel' : document.onmousewheel !== undefined ?
- 'mousewheel' : 'DOMMouseScroll';
- $(element).on(wheel, function (e) { core.wheelScroll(element, e); });
+ if (settings.horizMouseScroll) {
+ var wheel = 'onwheel' in element ?
+ 'wheel' : document.onmousewheel !== undefined ?
+ 'mousewheel' : 'DOMMouseScroll';
+ $(element).on(wheel, function (e) { core.wheelScroll(element, e); });
+ }
// Handle click events and dispatch to registered `onAddClick` function
dataPanel.click(function (e) {