Skip to content
Snippets Groups Projects
Select Git revision
  • d8b1c6003bd8a32a527f455b1b587e51f26ae6b4
  • annotation-on-video default protected
  • demo_ci
  • 3-upstream-01022023
  • master
  • gh3538-captions
  • 16-adapt-for-images-annot
  • 15-api-for-annotations-on-video
  • 15-annotations-on-videos
  • video_for_annotations
  • wip-1-annotations-on-videos
  • 9-videoviewer-tests
  • 9_wip_videotests
  • 6-fix-tests-and-ci
  • _fix_ci
  • wip-webpack-from-git
16 results

MiradorViewer.test.js

Blame
  • WorkspaceElasticWindow.js NaN GiB
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import { withStyles } from '@material-ui/core';
    import * as actions from '../state/actions';
    import WorkspaceElasticWindow from '../components/WorkspaceElasticWindow';
    import {
      selectCompanionWindowDimensions, getWorkspace, isFocused,
      getElasticLayout,
    } from '../state/selectors';
    
    /**
     * mapStateToProps - to hook up connect
     * @memberof Workspace
     * @private
     */
    const mapStateToProps = (state, { windowId }) => (
      {
        companionWindowDimensions: selectCompanionWindowDimensions(state, { windowId }),
        focused: isFocused(state, { windowId }),
        layout: getElasticLayout(state)[windowId],
        workspace: getWorkspace(state),
      }
    );
    
    /**
     * mapDispatchToProps - used to hook up connect to action creators
     * @memberof Workspace
     * @private
     */
    const mapDispatchToProps = (dispatch, props) => ({
      updateElasticWindowLayout: (windowId, position) => {
        dispatch(
          actions.updateElasticWindowLayout(windowId, position),
        );
      },
    });
    
    /**
     * @param theme
     */
    const styles = theme => ({
      focused: {
        zIndex: theme.zIndex.modal - 1,
      },
    });
    
    const enhance = compose(
      withStyles(styles),
      connect(mapStateToProps, mapDispatchToProps),
      // further HOC go here
    );
    
    export default enhance(WorkspaceElasticWindow);