Skip to content

Feature/24#35

Open
netstyler wants to merge 6 commits into
tristanguigue:masterfrom
netstyler:feature/24
Open

Feature/24#35
netstyler wants to merge 6 commits into
tristanguigue:masterfrom
netstyler:feature/24

Conversation

@netstyler
Copy link
Copy Markdown

Fixes the issue that no height is set of the dynamic layout container | fixes #24

Get the columns and get the lowest items with there heights.
Then get biggest item position and set it as dynamic-layout height

  • Added dynamic-layout element to the tests.
  • Updated also bower.json to set AngularJS 1.4.9 as dependency.
  • Fixed missing $timeout Dependency Injection

Comment thread dist/angular-dynamic-layout.js Outdated
var dlHeight = [];

for (i = 0; i < columns.length; ++i) {
for (j = 0; j < columns[i].length; ++j) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loop is not necessary as the height of the column only depends on its last element

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@netstyler should just be able to replace it with

// Calculate the full container height
var columnsHeights = getColumnsHeights(cols);
angular.element('[dynamic-layout]').css('height', Math.max.apply(null, columnsHeights));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aschmoe
Thanks a lot works fine on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting dynamic height of the dynamic-layout div

3 participants