OHIF-228: Viewports should not be clipped after resizing (#1865)

* Fix overflow of viewports

* Apply changes to sr

* Add double click back

Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
This commit is contained in:
Igor Octaviano 2020-07-03 15:50:33 -03:00 committed by GitHub
parent 14797a8973
commit b7760dc291
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -434,17 +434,14 @@ function OHIFCornerstoneSRViewport({
spacing: spacing:
PixelSpacing && PixelSpacing.length PixelSpacing && PixelSpacing.length
? `${PixelSpacing[0].toFixed(2)}mm x ${PixelSpacing[1].toFixed( ? `${PixelSpacing[0].toFixed(2)}mm x ${PixelSpacing[1].toFixed(
2 2
)}mm` )}mm`
: '', : '',
scanner: ManufacturerModelName || '', scanner: ManufacturerModelName || '',
}, },
}} }}
/> />
<div <div className="relative flex flex-row w-full h-full overflow-hidden" onDoubleClick={_onDoubleClick}>
className="relative flex flex-row w-full h-full"
onDoubleClick={_onDoubleClick}
>
<CornerstoneViewport <CornerstoneViewport
onElementEnabled={onElementEnabled} onElementEnabled={onElementEnabled}
viewportIndex={viewportIndex} viewportIndex={viewportIndex}
@ -457,8 +454,8 @@ function OHIFCornerstoneSRViewport({
frameRate={24} frameRate={24}
isOverlayVisible={false} isOverlayVisible={false}
/> />
{childrenWithProps}
</div> </div>
{childrenWithProps}
</> </>
); );
} }

View File

@ -329,7 +329,7 @@ function TrackedCornerstoneViewport({
/> />
{/* TODO: Viewport interface to accept stack or layers of content like this? */} {/* TODO: Viewport interface to accept stack or layers of content like this? */}
<div <div
className="relative flex flex-row w-full h-full" className="relative flex flex-row w-full h-full overflow-hidden"
onDoubleClick={_onDoubleClick} onDoubleClick={_onDoubleClick}
> >
<CornerstoneViewport <CornerstoneViewport