Skip to content

Commit

Permalink
Fix grabbing the correct gallery keyImage.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed May 2, 2014
1 parent 9545a84 commit e7fc08e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ansel/js/layout.js
Expand Up @@ -239,10 +239,11 @@ AnselLayout = Class.create({
// Fill the row with the images we know can fit. Start with any
// gallery tiles we decided to show.
while (totalNumber < totalCntRow && (totalNumber + baseLine) < this.galleries.length) {
var keyImage = this.galleries[totalNumber].ki,
var keyImage = this.galleries[baseLine + totalNumber].ki,
newwt = Math.floor(scaledWidths[baseLine + totalNumber] * ratio);

totalWidth += newwt;

// Create and insert image into current row.
(function() {
var wrap = new Element('span', {
Expand Down

0 comments on commit e7fc08e

Please sign in to comment.