Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeepOrder not working as expected #224

Open
tlemmons opened this issue May 10, 2016 · 0 comments
Open

KeepOrder not working as expected #224

tlemmons opened this issue May 10, 2016 · 0 comments

Comments

@tlemmons
Copy link

tlemmons commented May 10, 2016

When keepOrder is turned on it seems like everything gets "columnized" since all blocks resized to the same width, including small blocks that greatly extended. To fix I modified the keepOrder check in the js to only resize when free area is running out.

---- Starting at line 645 in my version
if (runtime.keepOrder) {
block = items.shift();

  •                    if (block.width > freeArea.width) {
    
  •                        if (runtime.minWoB > freeArea.width) {
    
  •                            items.unshift(block);
    
  •                            break;
    
  •                        }
                        block.resize = true;
    
    •                   }
                } else {
      

------for reference here is my initialization params
wall.reset({
selector: '.cell',
animate: true,
cellW: 50,
cellH: 10,
keepOrder: true,
onResize: function () {
wall.fitWidth();
}
});

Since I am only doing fixwidth, I am sure I did not account for fixheight so I did not try to make the changes myself. This makes all but the last block on the line holds its size, then the last block is sized down to fit. I would like it if all the blocks and/or white space could be slightly resized to fit instead so let me know if I have something setup wrong or if there is a better way to fix.

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

No branches or pull requests

1 participant