Skip to content
Snippets Groups Projects
Select Git revision
  • d550e1bbfad252c3117d8b68e54dc0a1ca8ca6ad
  • master default protected
  • multiprocessing
  • experiment/clara
  • experiment/spec2B-poc
  • experiment/qivalio-poc
  • experiment/ertms
  • MAY-2023
  • FEB-2023
  • EGC-2023
  • 0.2.1
  • v0.2.0
  • v0.1.2
13 results

SolarSystemSample_factoid.ttl

Blame
  • OpenSeadragonViewer.js 1.42 KiB
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import { withTranslation } from 'react-i18next';
    import { withPlugins } from '../extend/withPlugins';
    import { OpenSeadragonViewer } from '../components/OpenSeadragonViewer';
    import * as actions from '../state/actions';
    import CanvasWorld from '../lib/CanvasWorld';
    import {
      getSelectedAnnotationsOnCanvases,
      getHighlightedAnnotationsOnCanvases,
      getCanvasLabel,
      getSelectedCanvases,
      getViewer,
    } from '../state/selectors';
    
    /**
     * mapStateToProps - used to hook up connect to action creators
     * @memberof Window
     * @private
     */
    const mapStateToProps = (state, { windowId }) => ({
      canvasWorld: new CanvasWorld(getSelectedCanvases(state, { windowId })),
      config: state.config.viewer,
      focused: state.workspace.focusedWindowId === windowId,
      highlightedAnnotations: getHighlightedAnnotationsOnCanvases(state, { windowId }),
      label: getCanvasLabel(state, { windowId }),
      selectedAnnotations: getSelectedAnnotationsOnCanvases(state, { windowId }),
      viewer: getViewer(state, { windowId }),
    });
    
    /**
     * mapDispatchToProps - used to hook up connect to action creators
     * @memberof ManifestListItem
     * @private
     */
    const mapDispatchToProps = {
      updateViewport: actions.updateViewport,
    };
    
    const enhance = compose(
      withTranslation(),
      connect(mapStateToProps, mapDispatchToProps),
      withPlugins('OpenSeadragonViewer'),
    );
    
    
    export default enhance(OpenSeadragonViewer);