Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/fill-height.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
},
link: function (scope, element, attrs) {
if (scope.debounceWait === 0) {
angular.element($window).on('resize', windowResize);
angular.element($window).on('resize', onWindowResize);
} else {
// allow debounce wait time to be passed in.
// if not passed in, default to a reasonable 250ms
angular.element($window).on('resize', debounce(onWindowResize, scope.debounceWait || 250));
}

onWindowResize();

//call once the DOM is ready
$timeout(onWindowResize);

// returns a fn that will trigger 'time' amount after it stops getting called.
function debounce(fn, time) {
var timeout;
Expand Down Expand Up @@ -59,7 +60,7 @@
- footerElementHeight
- additionalPadding;

console.log(elementHeight);
//console.info(elementHeight);
element.css('height', elementHeight + 'px');
}

Expand Down