Skip to content

Commit

Permalink
Upgrade package.json deps, also fix css-layout now mutates vs returni…
Browse files Browse the repository at this point in the history
…ng a new object
  • Loading branch information
Jason Brown committed Sep 9, 2015
1 parent 556f14b commit 5159a7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
"react": "0.14.0-alpha3"
},
"dependencies": {
"css-layout": "0.0.2",
"wolfy87-eventemitter": "^4.2.11",
"babel-runtime": "^5.1.11"
"babel-runtime": "^5.1.11",
"css-layout": "^1.0.0",
"webpack": "^1.12.1",
"webpack-dev-server": "^1.10.1",
"wolfy87-eventemitter": "^4.2.11"
},
"devDependencies": {
"babel": "^5.1.11",
Expand Down
7 changes: 3 additions & 4 deletions src/flex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import EventEmitter from 'wolfy87-eventemitter';
import computeLayout from 'css-layout';
import isFlexBoxProperty from './flexbox-props';

const { Component } = React;

function setStyle (style = {}, styles, path = []) {
Expand Down Expand Up @@ -66,8 +65,8 @@ export class FlexContext extends Component {
}

computeLayoutAndBroadcastResults () {
const flexLayout = computeLayout(this.stylesRoot);
this.layoutNotifier.emit('layout-update', flexLayout);
computeLayout(this.stylesRoot);
this.layoutNotifier.emit('layout-update', this.stylesRoot);
}

componentWillMount () {
Expand Down Expand Up @@ -124,7 +123,7 @@ export const FlexBox = (Composed, componentStyles = {}) => class extends Compone
}

handleLayoutCalculation = layout => {
this.setState({ layout: this.getMyLayout(layout) });
this.setState({ layout: this.getMyLayout(layout).layout });
}

componentWillMount () {
Expand Down

0 comments on commit 5159a7b

Please sign in to comment.