From 4be9f27400ec940a797787adfba27decba9d8f83 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 9 Jul 2014 18:15:22 +0200 Subject: [PATCH] Cosmetic fixes on scroll handler of taskboard header and body. --- app/coffee/modules/taskboard/main.coffee | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/taskboard/main.coffee b/app/coffee/modules/taskboard/main.coffee index 9b325b09..e353413a 100644 --- a/app/coffee/modules/taskboard/main.coffee +++ b/app/coffee/modules/taskboard/main.coffee @@ -168,10 +168,11 @@ TaskboardDirective = ($rootscope) -> toggleText(target, ["Hide statistics", "Show statistics"]) # TODO: i18n $rootscope.$broadcast("taskboard:graph:toggle-visibility") - taskboardTableBodyDom = $el.find(".taskboard-table-body") - taskboardTableHeaderInnerDom = $el.find(".taskboard-table-header .taskboard-table-inner") - taskboardTableBodyDom.scroll () -> - taskboardTableHeaderInnerDom.css('left', -1 * taskboardTableBodyDom.scrollLeft()) + tableBodyDom = $el.find(".taskboard-table-body") + tableBodyDom.on "scroll", (event) -> + target = angular.element(event.currentTarget) + headerdom = $el.find(".taskboard-table-header .taskboard-table-inner") + headerdom.css("left", -1 * target.scrollLeft()) $scope.$on "$destroy", -> $el.off()