Also to be clear, this wheel scrolling code was present in fn.Gantt prior
to my commit.


On 31 July 2013 16:28, David Beswick <dlbeswick@gmail.com> wrote:

> I've made a change, but not sure that I've done it properly. Trying to
> listen to the "mousewheel" event didn't work on Firefox. The "wheel" event
> worked.
>
> The "mousewheel" event is deprecated in favour of "wheel" according to
> this page:
> https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel?redirectlocale=en-US&redirectslug=DOM%2FMozilla_event_reference%2Fwheel
>
> My change may mean that mouse wheel scroll will no longer work on older
> browsers. From the googling I did, there is a specific jQuery plugin to
> handle cross-browser mousewheel compatibility, but I don't know if you want
> to bring in that dependency.
>
>
>
> On 31 July 2013 15:48, David Beswick <dlbeswick@gmail.com> wrote:
>
>> Sure thing, I'll make the change and test it.
>>
>>
>> On 31 July 2013 15:46, Tait Brown <notifications@github.com> wrote:
>>
>>> In js/jquery.fn.gantt.js:
>>>
>>> > @@ -338,19 +341,38 @@
>>> >              dataPanel: function (element, width) {
>>> >                  var dataPanel = $('<div class="dataPanel" style="width: ' + width + 'px;"/>');
>>> >
>>> > -                // Handle mousewheel events for scrolling the data panel
>>> > -                var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel";
>>> > -                if (document.attachEvent) {
>>> > -                    element.attachEvent("on" + mousewheelevt, function (e) { core.wheelScroll(element, e); });
>>> > -                } else if (document.addEventListener) {
>>> > -                    element.addEventListener(mousewheelevt, function (e) { core.wheelScroll(element, e); }, false);
>>> > +                if (settings.scrollOnWheel == true) {
>>> > +                    // Handle mousewheel events for scrolling the data panel
>>> > +                    var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel";
>>>
>>> Considering this project has a jQuery dependency can we just use $(element).on("mousewheel",function()
>>> ..., as that would handle the event fallbacks?
>>>
>>> —
>>> Reply to this email directly or view it on GitHub<https://github.com/taitems/jQuery.Gantt/pull/83/files#r5496245>
>>> .
>>>
>>
>>
>