diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index 6d65de4c..e0f2a740 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -283,9 +283,14 @@ module.directive("tgKanban", ["$tgRepo", "$rootScope", KanbanDirective]) KanbanRowWidthFixerDirective = -> link = ($scope, $el, $attrs) -> bindOnce $scope, "usStatusList", (statuses) -> - itemSize = 310 - size = (statuses.length * itemSize) - 10 - $el.css("width", "#{size}px") + columnWidths = _.map statuses, (status) -> + if $scope.folds[status.id] + return 40 + else + return 310 + totalWidth = _.reduce columnWidths, (total, width) -> + return total + width + $el.css("width", totalWidth) $scope.$on "$destroy", -> $el.off() diff --git a/app/styles/modules/kanban/kanban-table.scss b/app/styles/modules/kanban/kanban-table.scss index 94ea92ca..a10330ba 100644 --- a/app/styles/modules/kanban/kanban-table.scss +++ b/app/styles/modules/kanban/kanban-table.scss @@ -34,6 +34,7 @@ $column-margin: 0 10px 0 0; @include table-flex-child(1, 0, 0); max-width: $column-folded-width; min-height: 2.5rem; + min-width: $column-folded-width; width: $column-folded-width; } .kanban-task {