Skip to content

Commit

Permalink
[fixed] reset gutter widths before calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Dec 13, 2015
1 parent 7df63a0 commit 5ac5c30
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TimeGrid.jsx
Expand Up @@ -206,9 +206,13 @@ 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 = '');

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

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

0 comments on commit 5ac5c30

Please sign in to comment.