Skip to content

Commit

Permalink
Removed this.running since it seems redundant. Closes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
okonet committed Nov 11, 2015
1 parent 2518a26 commit a89b9dd
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions lib/AbsoluteGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ import sortBy from 'lodash.sortby';

export default class AbsoluteGrid extends React.Component {

running;

constructor(props){
super(props);
this.running = false;
this.onResize = debounce(this.onResize, 150);
this.dragManager = new DragManager(this.props.onMove, this.props.keyProp);
this.state = {
Expand Down Expand Up @@ -93,15 +90,10 @@ export default class AbsoluteGrid extends React.Component {
}

onResize = () => {
if (!this.running) {
this.running = true;

if (window.requestAnimationFrame) {
window.requestAnimationFrame(this.getDOMWidth);
} else {
setTimeout(this.getDOMWidth, 66);
}

if (window.requestAnimationFrame) {
window.requestAnimationFrame(this.getDOMWidth);
} else {
setTimeout(this.getDOMWidth, 66);
}
}

Expand Down

0 comments on commit a89b9dd

Please sign in to comment.