-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update index.tsx with contentF #4811
base: master
Are you sure you want to change the base?
Update index.tsx with contentF #4811
Conversation
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -88,7 +88,7 @@ export const generateFromConfig = ({ config, overlayData, ...props }) => { | |||
|
|||
const itemGenerator = (props: any) => { | |||
const { item } = props; | |||
const { title, value: valueFunc, condition, contents } = item; | |||
const { title, value: valueFunc, contentF: contentFunc, condition, contents } = item; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { title, value: valueFunc, contentF: contentFunc = valueFunc, condition, contents } = item;
will assign to contentFunc directly
@mbellehumeur |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested that it works with value as well
The problem is that the configuration looks different for overlays for microscopy versus cornerstone viewports, whereas they really should be the same. |
Ticket: 8562338482 - Support for both 'value:' or 'contentF' when defining microscopy overlays.
Context
This PR aims to harmonize the definition of text overlays in OHIF.
The dicom-microscopy extension / microscopy mode uses the parameter name 'value' to store the function that returns the content of the overlay.
The basic viewer mode uses the parameter name 'contentF' to store the function that returns the content of the overlay.
This PR adds contentF parameter to microscopy overlays.
The original 'value" naming is also supported so existing configuration will work and new and updated configurations can use consistent naming.
Changed & Results
The ViewportOverlay component of the dicom-microscopy extension has updated parsing to load the function returning the overlay content for both value and contentF parameters.
Testing
In the customizationService element of the configuration, test with both contentF:
Or value:
Both should work the same.