Skip to content
Snippets Groups Projects
Commit 6b8fd467 authored by Anthony's avatar Anthony
Browse files

WIP Commit de la victoire, need to be cleaned

parent c5e1848e
No related branches found
No related tags found
2 merge requests!11Fix forward ref from Canvas Annotation Wrapper to CanvasAnnotation,!10Draft: MigratingAnnotationCreation to MUI5.
mirador @ 9f36a451
Subproject commit 1a9ef869f8868c6983ba5e465da63598b14d2d8e Subproject commit 9f36a451d213fffb794e41198bc312e2b9cfa80e
...@@ -30,7 +30,7 @@ class CanvasAnnotationsWrapper extends Component { ...@@ -30,7 +30,7 @@ class CanvasAnnotationsWrapper extends Component {
render() { render() {
const { const {
addCompanionWindow, annotationsOnCanvases, canvases, config, receiveAnnotation, addCompanionWindow, annotationsOnCanvases, canvases, config, receiveAnnotation,
switchToSingleCanvasView, TargetComponent, targetProps, windowViewType, switchToSingleCanvasView, TargetComponent, targetProps, windowViewType, containerRef,
} = this.props; } = this.props;
const { singleCanvasDialogOpen } = this.state; const { singleCanvasDialogOpen } = this.state;
...@@ -55,6 +55,7 @@ class CanvasAnnotationsWrapper extends Component { ...@@ -55,6 +55,7 @@ class CanvasAnnotationsWrapper extends Component {
> >
<TargetComponent <TargetComponent
{...props} {...props}
ref={containerRef}
/> />
{windowViewType !== 'single' && ( {windowViewType !== 'single' && (
<SingleCanvasDialog <SingleCanvasDialog
...@@ -79,6 +80,10 @@ CanvasAnnotationsWrapper.propTypes = { ...@@ -79,6 +80,10 @@ CanvasAnnotationsWrapper.propTypes = {
adapter: PropTypes.func, adapter: PropTypes.func,
}), }),
}).isRequired, }).isRequired,
containerRef: PropTypes.oneOfType([
PropTypes.func,
PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
]),
receiveAnnotation: PropTypes.func.isRequired, receiveAnnotation: PropTypes.func.isRequired,
switchToSingleCanvasView: PropTypes.func.isRequired, switchToSingleCanvasView: PropTypes.func.isRequired,
TargetComponent: PropTypes.oneOfType([ TargetComponent: PropTypes.oneOfType([
...@@ -92,6 +97,7 @@ CanvasAnnotationsWrapper.propTypes = { ...@@ -92,6 +97,7 @@ CanvasAnnotationsWrapper.propTypes = {
CanvasAnnotationsWrapper.defaultProps = { CanvasAnnotationsWrapper.defaultProps = {
annotationsOnCanvases: {}, annotationsOnCanvases: {},
canvases: [], canvases: [],
containerRef: null,
}; };
/** */ /** */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment