prevent burndown graph initial animation

stable
Juanfran 2015-10-15 09:20:54 +02:00 committed by Alejandro Alonso
parent 76967be9bf
commit 15b2ef20d7
2 changed files with 24 additions and 5 deletions

View File

@ -935,17 +935,31 @@ module.directive("tgBacklogUsPoints", ["$tgEstimationsService", "$tgRepo", "$tgT
## Burndown graph directive
#############################################################################
ToggleBurndownVisibility = ($storage) ->
hide = () ->
$(".js-burndown-graph").removeClass("shown")
$(".js-toggle-burndown-visibility-button").removeClass("active")
$(".js-burndown-graph").removeClass("open")
show = (firstLoad) ->
$(".js-toggle-burndown-visibility-button").addClass("active")
if firstLoad
$(".js-burndown-graph").addClass("shown")
else
$(".js-burndown-graph").addClass("open")
link = ($scope, $el, $attrs) ->
firstLoad = true
hash = generateHash(["is-burndown-grpahs-collapsed"])
$scope.isBurndownGraphCollapsed = $storage.get(hash) or false
toggleGraph = ->
if $scope.isBurndownGraphCollapsed
$(".js-toggle-burndown-visibility-button").removeClass("active")
$(".js-burndown-graph").removeClass("open")
hide(firstLoad)
else
$(".js-toggle-burndown-visibility-button").addClass("active")
$(".js-burndown-graph").addClass("open")
show(firstLoad)
firstLoad = false
$scope.$watch "showGraphPlaceholder", () ->
if $scope.showGraphPlaceholder?

View File

@ -189,5 +189,10 @@ $summary-background: $grayer;
}
.graphics-container {
@include slide(300px, hidden, 0);
$height: 300px;
@include slide($height, hidden, 0);
&.shown {
max-height: $height;
transition: none;
}
}