Last active
August 29, 2015 14:06
Revisions
-
dkarzon renamed this gist
Sep 23, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
dkarzon renamed this gist
Sep 22, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
dkarzon revised this gist
Sep 22, 2014 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ .scrollable { overflow: auto; overflow-x: scroll; overflow-y: hidden; -ms-scroll-chaining: none; } -
dkarzon created this gist
Sep 22, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ angular.module('dk.directives') .directive('dkscrollable', function () { //<div dkscrollable> //Handles the scrolling table for the site function handleWheel(event) { event.currentTarget.scrollLeft += event.wheelDelta * -1; event.preventDefault(); }; return { restrict: 'A', multiElement: true, link: function (scope, element, attr) { var container = element[0]; container.classList.add("scrollable"); if ('onwheel' in container) { container.addEventListener('wheel', handleWheel, false); } else { container.addEventListener('mousewheel', handleWheel, false); } } }; });