chore: Clean up unused files, imports, and work on getting end-to-end tests and unit tests running (#2272)
This commit is contained in:
1 parent
414ebc6850
commit
0db81b30f3
374 files changed
+14138
-21288
No files matched your search
+9
-1
@@ -29,13 +29,20 @@ function _askTrackMeasurements(UIViewportDialogService, viewportIndex) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
const message = 'Track measurements for this series?';
|
||||
const actions = [
|
||||
{ type: 'cancel', text: 'No', value: RESPONSE.CANCEL },
|
||||
{
|
||||
id: 'prompt-begin-tracking-cancel',
|
||||
type: 'cancel',
|
||||
text: 'No',
|
||||
value: RESPONSE.CANCEL
|
||||
},
|
||||
{
|
||||
id: 'prompt-begin-tracking-no-do-not-ask-again',
|
||||
type: 'secondary',
|
||||
text: 'No, do not ask again',
|
||||
value: RESPONSE.NO_NEVER,
|
||||
},
|
||||
{
|
||||
id: 'prompt-begin-tracking-yes',
|
||||
type: 'primary',
|
||||
text: 'Yes',
|
||||
value: RESPONSE.SET_STUDY_AND_SERIES,
|
||||
@@ -48,6 +55,7 @@ function _askTrackMeasurements(UIViewportDialogService, viewportIndex) {
|
||||
|
||||
UIViewportDialogService.show({
|
||||
viewportIndex,
|
||||
id: 'measurement-tracking-prompt-begin-tracking',
|
||||
type: 'info',
|
||||
message,
|
||||
actions,
|
||||
|
||||
@@ -244,7 +244,8 @@ function PanelMeasurementTableTracking({ servicesManager, extensionManager }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="overflow-x-hidden overflow-y-auto invisible-scrollbar">
|
||||
<div className="overflow-x-hidden overflow-y-auto invisible-scrollbar"
|
||||
data-cy={"trackedMeasurements-panel"}>
|
||||
{displayStudySummary.key && (
|
||||
<StudySummary
|
||||
date={formatDate(displayStudySummary.date)}
|
||||
|
||||
@@ -225,7 +225,6 @@ function TrackedCornerstoneViewport({
|
||||
// frameRate = 0,
|
||||
} = viewportData.stack;
|
||||
|
||||
// TODO: Does it make more sense to use Context?
|
||||
if (children && children.length) {
|
||||
childrenWithProps = children.map((child, index) => {
|
||||
return (
|
||||
@@ -371,7 +370,6 @@ function TrackedCornerstoneViewport({
|
||||
// Sync resize throttle w/ sidepanel animation duration to prevent
|
||||
// seizure inducing strobe blinking effect
|
||||
resizeRefreshRateMs={150}
|
||||
// TODO: ViewportGrid Context?
|
||||
isActive={true} // todo
|
||||
isStackPrefetchEnabled={true} // todo
|
||||
isPlaying={isPlaying}
|
||||
@@ -390,6 +388,7 @@ function TrackedCornerstoneViewport({
|
||||
<div className="absolute w-full">
|
||||
{viewportDialogState.viewportIndex === viewportIndex && (
|
||||
<Notification
|
||||
id={viewportDialogState.id}
|
||||
message={viewportDialogState.message}
|
||||
type={viewportDialogState.type}
|
||||
actions={viewportDialogState.actions}
|
||||
@@ -609,12 +608,12 @@ function _jumpToMeasurement(
|
||||
const scrollToHandler = evt => {
|
||||
scrollToIndex(targetElement, imageIndex);
|
||||
targetElement.removeEventListener(
|
||||
'cornerstoneimagerendered',
|
||||
cornerstone.EVENTS.IMAGE_RENDERED,
|
||||
scrollToHandler
|
||||
);
|
||||
};
|
||||
targetElement.addEventListener(
|
||||
'cornerstoneimagerendered',
|
||||
cornerstone.EVENTS.IMAGE_RENDERED,
|
||||
scrollToHandler
|
||||
);
|
||||
|
||||
|
||||
@@ -25,13 +25,14 @@ const ViewportOverlay = ({
|
||||
return null;
|
||||
}
|
||||
|
||||
// TODO: this component should be presentational only. Right now it has a weird dependency on Cornerstone
|
||||
const generalImageModule =
|
||||
cornerstone.metaData.get('generalImageModule', imageId) || {};
|
||||
const { instanceNumber } = generalImageModule;
|
||||
|
||||
return (
|
||||
<div className="text-primary-light">
|
||||
<div className={classnames(overlay, topLeft)}>
|
||||
<div data-cy={"viewport-overlay-top-left"} className={classnames(overlay, topLeft)}>
|
||||
{isZoomActive && (
|
||||
<div className="flex flex-row">
|
||||
<span className="mr-1">Zoom:</span>
|
||||
@@ -49,7 +50,7 @@ const ViewportOverlay = ({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className={classnames(overlay, topRight)}>
|
||||
<div data-cy={"viewport-overlay-top-right"} className={classnames(overlay, topRight)}>
|
||||
{stackSize > 1 && (
|
||||
<div className="flex flex-row">
|
||||
<span className="mr-1">I:</span>
|
||||
@@ -59,8 +60,8 @@ const ViewportOverlay = ({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className={classnames(overlay, bottomRight)}></div>
|
||||
<div className={classnames(overlay, bottomLeft)}></div>
|
||||
<div data-cy={"viewport-overlay-bottom-right"} className={classnames(overlay, bottomRight)}></div>
|
||||
<div data-cy={"viewport-overlay-bottom-left"} className={classnames(overlay, bottomLeft)}></div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user