Skip to content

Commit

Permalink
[fixed] Incorrect gutter widths
Browse files Browse the repository at this point in the history
fixes jquense#24, fixes jquense#16
  • Loading branch information
jquense committed Jan 14, 2016
1 parent 646b78c commit 5fa7012
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/TimeGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,22 +208,21 @@ let TimeGrid = React.createClass({
let gutterCells = [findDOMNode(this.refs.gutter), ...this._gutters]
let isOverflowing = this.refs.content.scrollHeight > this.refs.content.clientHeight;

if (width)
gutterCells.forEach(
node => node.style.width = '');
if (!width) {
this._gutterWidth = Math.max(...gutterCells.map(getWidth));

this._gutterWidth = Math.max(...gutterCells.map(getWidth));

if (this._gutterWidth && width !== this._gutterWidth) {
width = this._gutterWidth + 'px';
gutterCells.forEach(node => node.style.width = width)
if (this._gutterWidth) {
width = this._gutterWidth + 'px';
gutterCells.forEach(node => node.style.width = width)
}
}

if (isOverflowing) {
classes.addClass(header, 'rbc-header-overflowing')
this.refs.headerCell.style[!isRtl ? 'marginLeft' : 'marginRight'] = '';
this.refs.headerCell.style[isRtl ? 'marginLeft' : 'marginRight'] = scrollbarSize() + 'px';
} else {
}
else {
classes.removeClass(header, 'rbc-header-overflowing')
}
}
Expand Down

0 comments on commit 5fa7012

Please sign in to comment.