Skip to content

Commit

Permalink
[fixed] show more row layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Oct 28, 2015
1 parent 7ee9959 commit 0574eed
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/EventEndingRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ let EventRow = React.createClass({
continue;
}

let gap = Math.max(0, left - lastEnd);

if (this.canRenderSlotEvent(left, span)) {
let gap = left - lastEnd;
let content = this.renderEvent(event)

if (gap)
Expand All @@ -51,6 +52,9 @@ let EventRow = React.createClass({
lastEnd = current = (right + 1);
}
else {
if (gap)
row.push(this.renderSpan(gap, key + '_gap'))

row.push(this.renderSpan(1, key, this.renderShowMore(segments, current)))
current++;
}
Expand Down Expand Up @@ -88,6 +92,11 @@ let EventRow = React.createClass({
{messages.showMore(count)}
</a>
) : false
},

_showMore(slot, e){
e.preventDefault()
this.props.onShowMore(slot)
}
});

Expand Down

0 comments on commit 0574eed

Please sign in to comment.