Skip to content

Commit

Permalink
tweak total scroll width calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart authored and Ovilia committed Jul 11, 2020
1 parent 5ed955f commit f0bc1eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
var companyImages = $('.companies img');
var loadedCompanyImages = companyImages.filter('.loaded');
companyLoaded = loadedCompanyImages.length === companyImages.length;
for (var i = 1, len = loadedCompanyImages.length; i < len - 3; ++i) {
companyTotalWidth += loadedCompanyImages[i].width + (i === len - 4 ? 60 : 30);
for (var i = 1, len = loadedCompanyImages.length; i < len; ++i) {
companyTotalWidth += loadedCompanyImages[i].width;
}
}
companyLeft += 1;
Expand Down

0 comments on commit f0bc1eb

Please sign in to comment.