diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 08249a3124..d1809e6a9c 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -359,22 +359,38 @@ PreviewFrame.defaultProps = { cmController: {} }; -const mapStateToProps = state => ({ - files: state.files, - htmlFile: getHTMLFile(state.files), - content: - (state.files.find(file => file.isSelectedFile) || - state.files.find(file => file.name === 'sketch.js') || - state.files.find(file => file.name !== 'root')).content, - isPlaying: state.ide.isPlaying, - isAccessibleOutputPlaying: state.ide.isAccessibleOutputPlaying, - previewIsRefreshing: state.ide.previewIsRefreshing, - textOutput: state.preferences.textOutput, - gridOutput: state.preferences.gridOutput, - soundOutput: state.preferences.soundOutput, - language: state.preferences.language, - autorefresh: state.preferences.autorefresh, -}); +function mapStateToProps(state, ownProps) { + if (ownProps.fullView) { + return { + files: state.files, + htmlFile: getHTMLFile(state.files), + isPlaying: true, + isAccessibleOutputPlaying: false, + textOutput: false, + gridOutput: false, + soundOutput: false, + language: state.preferences.language, + autorefresh: false, + previewIsRefreshing: false + }; + } + return { + files: state.files, + htmlFile: getHTMLFile(state.files), + content: + (state.files.find(file => file.isSelectedFile) || + state.files.find(file => file.name === 'sketch.js') || + state.files.find(file => file.name !== 'root')).content, + isPlaying: state.ide.isPlaying, + isAccessibleOutputPlaying: state.ide.isAccessibleOutputPlaying, + previewIsRefreshing: state.ide.previewIsRefreshing, + textOutput: state.preferences.textOutput, + gridOutput: state.preferences.gridOutput, + soundOutput: state.preferences.soundOutput, + language: state.preferences.language, + autorefresh: state.preferences.autorefresh + }; +} const mapDispatchToProps = { diff --git a/client/modules/IDE/pages/FullView.jsx b/client/modules/IDE/pages/FullView.jsx index f8f9e96fd6..d2f4f57a65 100644 --- a/client/modules/IDE/pages/FullView.jsx +++ b/client/modules/IDE/pages/FullView.jsx @@ -5,7 +5,6 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import PreviewFrame from '../components/PreviewFrame'; import PreviewNav from '../../../components/PreviewNav'; -import { getHTMLFile, getJSFiles, getCSSFiles } from '../reducers/files'; import * as ProjectActions from '../actions/project'; class FullView extends React.Component { @@ -13,8 +12,6 @@ class FullView extends React.Component { this.props.getProject(this.props.params.project_id, this.props.params.username); } - ident = () => {} - render() { return (