bump RCV version and use new prop to control resize/refresh behavior (#1869)

This commit is contained in:
Danny Brown authored and GitHub committed 2020-07-04 13:25:23 -04:00
1 parent e2c72d48fe
commit 86327cd808
6 files changed
+17 -24

No files matched your search

+1 -1
View File
@@ -50,6 +50,6 @@
"classnames": "^2.2.6",
"lodash.merge": "^4.6.2",
"lodash.throttle": "^4.1.1",
"react-cornerstone-viewport": "3.0.0"
"react-cornerstone-viewport": "4.0.0"
}
}
@@ -1,28 +1,11 @@
import React, { Component } from 'react';
import CornerstoneViewport from 'react-cornerstone-viewport';
//import ConnectedCornerstoneViewport from './ConnectedCornerstoneViewport';
import OHIF from '@ohif/core';
import PropTypes from 'prop-types';
import debounce from 'lodash.debounce';
import throttle from 'lodash.throttle';
import { setEnabledElement } from './state';
// const {
// onAdded,
// onRemoved,
// onModified,
// } = OHIF.measurements.MeasurementHandlers;
// // TODO: Transition to enums for the action names so that we can ensure they stay up to date
// // everywhere they're used.
// const MEASUREMENT_ACTION_MAP = {
// added: onAdded,
// removed: onRemoved,
// modified: throttle(event => {
// return onModified(event);
// }, 300),
// };
// const cine = viewportSpecificData.cine;
@@ -228,6 +211,9 @@ class OHIFCornerstoneViewport extends Component {
const enabledElement = evt.detail.element;
setEnabledElement(viewportIndex, enabledElement);
}}
// Sync resize throttle w/ sidepanel animation duration to prevent
// seizure inducing strobe blinking effect
resizeRefreshRateMs={150}
/>
{childrenWithProps}
</>
+1 -1
View File
@@ -50,6 +50,6 @@
"classnames": "^2.2.6",
"lodash.merge": "^4.6.2",
"lodash.throttle": "^4.1.1",
"react-cornerstone-viewport": "3.0.0"
"react-cornerstone-viewport": "4.0.0"
}
}
@@ -453,6 +453,9 @@ function OHIFCornerstoneSRViewport({
isPlaying={false}
frameRate={24}
isOverlayVisible={false}
// Sync resize throttle w/ sidepanel animation duration to prevent
// seizure inducing strobe blinking effect
resizeRefreshRateMs={150}
/>
{childrenWithProps}
</div>
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import cornerstone from 'cornerstone-core';
import cornerstoneTools from 'cornerstone-tools';
import CornerstoneViewport from 'react-cornerstone-viewport';
import OHIF, { DicomMetadataStore, utils } from '@ohif/core';
import OHIF, { utils } from '@ohif/core';
import {
Notification,
ViewportActionBar,
@@ -345,6 +345,9 @@ function TrackedCornerstoneViewport({
imageIndex: currentImageIdIndex,
});
}}
// 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