Recalculate Kanban Table Container Width on load page
parent
53745273e6
commit
91c3b213e8
|
@ -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()
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue