Skip to content

Commit

Permalink
Merge pull request #2730 from oliviertassinari/left-nav-fix-transitio…
Browse files Browse the repository at this point in the history
…n-transform

[LeftNav] Only transition the transform property
  • Loading branch information
alitaheri committed Dec 30, 2015
2 parents 79f52be + 19a8811 commit 85a7cba
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 313 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
src/utils/modernizr.custom.js
src/svg-icons
1 change: 0 additions & 1 deletion docs/webpack-dev-server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const config = {
include: [path.resolve(__dirname, '../src')],
exclude: [
path.resolve(__dirname, '../src/svg-icons'),
path.resolve(__dirname, '../src/utils/modernizr.custom.js'),
],
},
],
Expand Down
1 change: 0 additions & 1 deletion docs/webpack-production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ const config = {
include: [path.resolve(__dirname, '../src')],
exclude: [
path.resolve(__dirname, '../src/svg-icons'),
path.resolve(__dirname, '../src/utils/modernizr.custom.js'),
],
},
],
Expand Down
9 changes: 4 additions & 5 deletions src/left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ import DefaultRawTheme from './styles/raw-themes/light-raw-theme';
import ThemeManager from './styles/theme-manager';
import warning from 'warning';
import deprecated from './utils/deprecatedPropType';
import isBrowser from './utils/is-browser';

const Modernizr = isBrowser ? require('./utils/modernizr.custom') : undefined;
let openNavEventHandler = null;


const LeftNav = React.createClass({

mixins: [
Expand Down Expand Up @@ -254,16 +251,17 @@ const LeftNav = React.createClass({
const rawTheme = muiTheme.rawTheme;

const x = this._getTranslateMultiplier() * (this.state.open ? 0 : this._getMaxTranslateX());

const styles = {
root: {
height: '100%',
width: this.props.width || theme.width,
position: 'fixed',
zIndex: muiTheme.zIndex.leftNav,
left: isBrowser && Modernizr.csstransforms3d ? 0 : x,
left: 0,
top: 0,
transform: `translate3d(${x}px, 0, 0)`,
transition: !this.state.swiping && Transitions.easeOut(),
transition: !this.state.swiping && Transitions.easeOut(null, 'transform', null),
backgroundColor: theme.color,
overflow: 'auto',
},
Expand Down Expand Up @@ -350,6 +348,7 @@ const LeftNav = React.createClass({
onItemTap={this._onMenuItemClick} />
);
}

return (
<div>
{overlay}
Expand Down
5 changes: 0 additions & 5 deletions src/utils/is-browser.js

This file was deleted.

300 changes: 0 additions & 300 deletions src/utils/modernizr.custom.js

This file was deleted.

0 comments on commit 85a7cba

Please sign in to comment.