Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
update(docs): menu open to selected/linked demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Jan 31, 2016
1 parent bb7d62e commit 9213687
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docs/app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,15 +486,11 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES, $location, $rootScope, $http, $wind
function (open) {
var $ul = $element.find('ul');

$timeout(function () {
updateHeight(open ? getTargetHeight() : 0);
}, 0, false);

function updateHeight(targetHeight) {
$timeout(function updateHeight() {
$timeout(function () {

This comment has been minimized.

Copy link
@devversion

devversion Jan 31, 2016

Member

@ThomasBurleson Why are there two timeouts?

$ul.css({ height: targetHeight + 'px' });
$ul.css({ height: (open ? getTargetHeight() : 0) + 'px' });
}, 0, false);
}
}, 0, false);

function getTargetHeight () {
var targetHeight;
Expand Down

0 comments on commit 9213687

Please sign in to comment.