Skip to content
Snippets Groups Projects
Select Git revision
  • f520325e37b97d87e158b423c62886f89176f06b
  • mui5-annotation-on-video-stable default
  • get_setter_canvasSizeInformations
  • fix-error-div-into-p
  • annotation-on-video-v2
  • detached
  • annotation-on-video-r17
  • mui5
  • mui5-react-18
  • jacob-test
  • annotation-on-video protected
  • master
  • test-antoinev1
  • 20-fetch-thumbnail-on-annotation
  • add-research-field
  • Save
  • add-plugin
  • 14-wip-no-seek-to
  • 14-bug-on-video-time-control
  • 9_wip_videotests
  • _upgrade_material_ui
  • latest-tetras-16
  • v3.3.0
  • v3.2.0
  • v3.1.1
  • v3.1.0
  • v3.0.0
  • v3.0.0-rc.7
  • v3.0.0-rc.6
  • v3.0.0-rc.5
  • v3.0.0-rc.4
  • v3.0.0-rc.3
  • v3.0.0-rc.2
  • v3.0.0-rc.1
  • v3.0.0-beta.10
  • v3.0.0-beta.9
  • v3.0.0-beta.8
  • v3.0.0-beta.7
  • v3.0.0-beta.6
  • v3.0.0-beta.5
  • v3.0.0-beta.3
41 results

Window.js

Blame
  • user avatar
    Chris Beer authored
    f520325e
    History
    Window.js 1.79 KiB
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import { withStyles } from '@material-ui/core';
    import { withTranslation } from 'react-i18next';
    import { Window } from '../components/Window';
    import { getWindowManifest, getManifestTitle, getThumbnailNavigationPosition } from '../state/selectors';
    
    
    /**
     * mapStateToProps - used to hook up connect to action creators
     * @memberof Window
     * @private
     */
    const mapStateToProps = (state, props) => ({
      manifest: state.manifests[props.window.manifestId],
      window: state.windows[props.window.id],
      workspaceType: state.config.workspace.type,
      label: getManifestTitle(getWindowManifest(state, props.window.id)),
      thumbnailNavigationPosition: getThumbnailNavigationPosition(state, props.window.id),
    });
    
    /**
     * @param theme
     */
    const styles = theme => ({
      window: {
        backgroundColor: theme.palette.primary.dark,
        display: 'flex',
        flexDirection: 'column',
        height: '100%',
        width: '100%',
        minHeight: 0,
        overflow: 'hidden',
      },
      middle: {
        display: 'flex',
        flexDirection: 'row',
        flex: '1',
        minHeight: 0,
      },
      middleLeft: {
        display: 'flex',
        flexDirection: 'column',
        flex: '1',
        minHeight: 0,
      },
      primaryWindow: {
        display: 'flex',
        flex: '1',
        position: 'relative',
        height: '300px',
        minHeight: 0,
      },
      companionAreaRight: {
        display: 'flex',
        flex: '0',
        minHeight: 0,
      },
      companionAreaBottom: {
        display: 'flex',
        flex: '0',
        minHeight: 0,
        flexBasis: 'auto',
      },
      thumbnailArea: {
        backgroundColor: theme.palette.primary.dark,
      },
      thumbnailAreaBottom: {
      },
      thumbnailAreaRight: {
        minWidth: 100,
      },
    });
    
    const enhance = compose(
      withTranslation(),
      withStyles(styles),
      connect(mapStateToProps),
    );
    
    export default enhance(Window);