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

Fix #2056 #2087

merged 4 commits into from Sep 15, 2015

Fix #2056 #2087

merged 4 commits into from Sep 15, 2015


Copy link

@ralsina ralsina commented Sep 15, 2015

A few minor changes:

  1. Add padding between rows because without it it looked awful
  2. Spread the width slack among image containers to get even rows

Copy link

Kwpolska commented Sep 15, 2015

Your editor ruined the indentation. Here’s a better diff, courtesy of ?w=1:

                 // Create a new row div, add class, append the htmls and insert the flowy items
                 var $row = $('<div>').addClass(settings.rowClassName);
+                var slack = $this[0].clientWidth - rowData.width - 2 * settings.padding
                 for (i = 0; i <; i++) {
                     var displayData =[i];
                     // Get the HTML object from custom render function passed as argument
                     var displayObject =$this, displayData);
                     displayObject = $(displayObject);
+                    extraw = Math.floor(slack/
+                    if (i == 0) {
+                        extraw += slack %
+                    }
                     // Set some basic stuff
-                       .css( 'width', displayData.width )
+                        .css('width', displayData.width + extraw)
                         .css('height', displayData.height)
+                        .css('margin-bottom', settings.padding + "px")
                         .css('margin-left', i == 0 ? '0' : settings.padding + "px"); //TODO:Refactor

And with this, I guess it looks okay.

Copy link
Member Author

ralsina commented Sep 15, 2015

Actually, I reindented the file because it was horrible to edit :-P

ralsina added a commit that referenced this pull request Sep 15, 2015
@ralsina ralsina merged commit acd7b15 into master Sep 15, 2015
@ralsina ralsina deleted the fix-2056 branch Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants