Fix the wrong aspect ratio load (#3534)

This commit is contained in:
Bill Wallace 2023-07-19 15:21:19 -04:00 committed by GitHub
parent b904ea0f23
commit d5cbbb037d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -130,7 +130,6 @@ const OHIFCornerstoneViewport = React.memo(props => {
const [{ isCineEnabled, cines }, cineService] = useCine(); const [{ isCineEnabled, cines }, cineService] = useCine();
const [{ activeViewportIndex }] = useViewportGrid(); const [{ activeViewportIndex }] = useViewportGrid();
const [enabledVPElement, setEnabledVPElement] = useState(null); const [enabledVPElement, setEnabledVPElement] = useState(null);
const elementRef = useRef(); const elementRef = useRef();
const { const {
@ -435,7 +434,6 @@ const OHIFCornerstoneViewport = React.memo(props => {
displaySetOptions, displaySetOptions,
presentations presentations
); );
if (measurement) { if (measurement) {
cs3DTools.annotation.selection.setAnnotationSelected(measurement.uid); cs3DTools.annotation.selection.setAnnotationSelected(measurement.uid);
} }
@ -488,11 +486,8 @@ const OHIFCornerstoneViewport = React.memo(props => {
<React.Fragment> <React.Fragment>
<div className="viewport-wrapper"> <div className="viewport-wrapper">
<ReactResizeDetector <ReactResizeDetector
handleWidth refreshMode="debounce"
handleHeight refreshRate={50} // Wait 50 ms after last move to render
skipOnMount={true} // Todo: make these configurable
refreshMode={'debounce'}
refreshRate={200} // transition amount in side panel
onResize={onResize} onResize={onResize}
targetRef={elementRef.current} targetRef={elementRef.current}
/> />
@ -659,7 +654,6 @@ function _jumpToMeasurement(
const viewportInfo = cornerstoneViewportService.getViewportInfoByIndex( const viewportInfo = cornerstoneViewportService.getViewportInfoByIndex(
viewportIndex viewportIndex
); );
if (enabledElement) { if (enabledElement) {
// See how the jumpToSlice() of Cornerstone3D deals with imageIdx param. // See how the jumpToSlice() of Cornerstone3D deals with imageIdx param.
const viewport = enabledElement.viewport as const viewport = enabledElement.viewport as

View File

@ -18,6 +18,7 @@ const Footer = ({ actions, className, onSubmit, value }) => {
return ( return (
<Button <Button
key={index} key={index}
name={action.text}
className={classNames({ 'ml-2': !isFirst }, action.classes)} className={classNames({ 'ml-2': !isFirst }, action.classes)}
type={action.type} type={action.type}
onClick={onClickHandler} onClick={onClickHandler}