Skip to content

Commit

Permalink
Update box-drag.js
Browse files Browse the repository at this point in the history
line height of header should likely not be part of equation for element.css height. TODO: further review.
  • Loading branch information
mg1075 authored Jan 4, 2018
1 parent 46b3121 commit c4841cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions box-drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@


var height_header = angular.element(element[0].querySelector('div.box-drag-header')).prop('offsetHeight'),
height_header_lineheight = angular.element(element[0].querySelector('div.box-drag-header')).css('line-height'),
// DEPRECATED until further review.
// height_header_lineheight = angular.element(element[0].querySelector('div.box-drag-header')).css('line-height'),
height_body = angular.element(element[0].querySelector('div.box-drag-body')).prop('offsetHeight'),
height_footer = angular.element(element[0].querySelector('div.box-drag-footer')).prop('offsetHeight');

/*
* TODO: find a better way to deal with header height.
* Because 'offsetHeight' fails to get the actual height of the element!
*/
height_header_lineheight = parseFloat(height_header_lineheight.replace('px', ''));
// height_header_lineheight = parseFloat(height_header_lineheight.replace('px', ''));

/**
* In case there is no footer.
Expand All @@ -84,7 +85,7 @@
/**
* Compute the wrapper height based off the heights of the header, body, and footer divs.
*/
element.css({ height: height_header + height_header_lineheight + height_body + height_footer + 'px' });
element.css({ height: height_header + /*height_header_lineheight +*/ height_body + height_footer + 'px' });


var initialMove = true;
Expand Down

0 comments on commit c4841cb

Please sign in to comment.