diff --git a/src/SeqViewerContainer.tsx b/src/SeqViewerContainer.tsx index 6ace6f3a4..fea21a851 100644 --- a/src/SeqViewerContainer.tsx +++ b/src/SeqViewerContainer.tsx @@ -84,13 +84,20 @@ class SeqViewerContainer extends React.Component { + if (this.props.selection !== prevProps.selection) { + this.setCentralIndex("LINEAR", this.props.selection?.start || 0); + } + }; + /** this is here because the size listener is returning a new "size" prop every time */ shouldComponentUpdate = (nextProps: SeqViewerContainerProps, nextState: any) => !isEqual(nextProps, this.props) || !isEqual(nextState, this.state);