prevent burndown graph initial animation
parent
76967be9bf
commit
15b2ef20d7
|
@ -935,17 +935,31 @@ module.directive("tgBacklogUsPoints", ["$tgEstimationsService", "$tgRepo", "$tgT
|
||||||
## Burndown graph directive
|
## Burndown graph directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
ToggleBurndownVisibility = ($storage) ->
|
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) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
|
firstLoad = true
|
||||||
hash = generateHash(["is-burndown-grpahs-collapsed"])
|
hash = generateHash(["is-burndown-grpahs-collapsed"])
|
||||||
$scope.isBurndownGraphCollapsed = $storage.get(hash) or false
|
$scope.isBurndownGraphCollapsed = $storage.get(hash) or false
|
||||||
|
|
||||||
toggleGraph = ->
|
toggleGraph = ->
|
||||||
if $scope.isBurndownGraphCollapsed
|
if $scope.isBurndownGraphCollapsed
|
||||||
$(".js-toggle-burndown-visibility-button").removeClass("active")
|
hide(firstLoad)
|
||||||
$(".js-burndown-graph").removeClass("open")
|
|
||||||
else
|
else
|
||||||
$(".js-toggle-burndown-visibility-button").addClass("active")
|
show(firstLoad)
|
||||||
$(".js-burndown-graph").addClass("open")
|
|
||||||
|
firstLoad = false
|
||||||
|
|
||||||
$scope.$watch "showGraphPlaceholder", () ->
|
$scope.$watch "showGraphPlaceholder", () ->
|
||||||
if $scope.showGraphPlaceholder?
|
if $scope.showGraphPlaceholder?
|
||||||
|
|
|
@ -189,5 +189,10 @@ $summary-background: $grayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.graphics-container {
|
.graphics-container {
|
||||||
@include slide(300px, hidden, 0);
|
$height: 300px;
|
||||||
|
@include slide($height, hidden, 0);
|
||||||
|
&.shown {
|
||||||
|
max-height: $height;
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue