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

View File

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