import React, { PropTypes } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ControlPane from './ControlPane'; import PreviewPane from './PreviewPane'; import styles from './EntryEditor.css'; export default class EntryEditor extends React.Component { constructor(props) { super(props); this.state = {}; this.handleResize = this.handleResize.bind(this); } componentDidMount() { this.calculateHeight(); window.addEventListener('resize', this.handleResize, false); } componengWillUnmount() { window.removeEventListener('resize', this.handleResize); } handleResize() { this.calculateHeight(); } calculateHeight() { const height = window.innerHeight - 54; console.log('setting height to %s', height); this.setState({height}); } render() { const { collection, entry, getMedia, onChange, onAddMedia, onRemoveMedia, onPersist } = this.props; const {height} = this.state; return