From dca82d63d47bdf91beb453445185aacbf4bc38af Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 23 Jul 2014 15:28:19 +0200 Subject: [PATCH] Fix column height on kanban. --- app/coffee/modules/kanban/sortable.coffee | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/coffee/modules/kanban/sortable.coffee b/app/coffee/modules/kanban/sortable.coffee index 1b4b34bb..74026280 100644 --- a/app/coffee/modules/kanban/sortable.coffee +++ b/app/coffee/modules/kanban/sortable.coffee @@ -26,6 +26,7 @@ toggleText = @.taiga.toggleText scopeDefer = @.taiga.scopeDefer bindOnce = @.taiga.bindOnce groupBy = @.taiga.groupBy +timeout = @.taiga.timeout module = angular.module("taigaKanban") @@ -41,12 +42,14 @@ KanbanSortableDirective = ($repo, $rs, $rootscope) -> ######################### link = ($scope, $el, $attrs) -> - mainPadding = 32 # px - elementOffset = $el.offset().top - windowHeight = angular.element(window).height() - columnHeight = windowHeight - elementOffset - mainPadding + timeout 500, -> + mainPadding = 32 # px + elementOffset = $el.parent().parent().offset().top + windowHeight = angular.element(window).height() + columnHeight = windowHeight - elementOffset - mainPadding - $el.css("height", "#{columnHeight}px") + console.log elementOffset, windowHeight, columnHeight + $el.css("height", "#{columnHeight}px") oldParentScope = null newParentScope = null