bump RCV version and use new prop to control resize/refresh behavior (#1869)
This commit is contained in:
parent
e2c72d48fe
commit
86327cd808
@ -50,6 +50,6 @@
|
|||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"lodash.throttle": "^4.1.1",
|
"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 React, { Component } from 'react';
|
||||||
import CornerstoneViewport from 'react-cornerstone-viewport';
|
import CornerstoneViewport from 'react-cornerstone-viewport';
|
||||||
//import ConnectedCornerstoneViewport from './ConnectedCornerstoneViewport';
|
|
||||||
import OHIF from '@ohif/core';
|
import OHIF from '@ohif/core';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import debounce from 'lodash.debounce';
|
import debounce from 'lodash.debounce';
|
||||||
import throttle from 'lodash.throttle';
|
|
||||||
|
|
||||||
import { setEnabledElement } from './state';
|
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;
|
// const cine = viewportSpecificData.cine;
|
||||||
|
|
||||||
@ -228,6 +211,9 @@ class OHIFCornerstoneViewport extends Component {
|
|||||||
const enabledElement = evt.detail.element;
|
const enabledElement = evt.detail.element;
|
||||||
setEnabledElement(viewportIndex, enabledElement);
|
setEnabledElement(viewportIndex, enabledElement);
|
||||||
}}
|
}}
|
||||||
|
// Sync resize throttle w/ sidepanel animation duration to prevent
|
||||||
|
// seizure inducing strobe blinking effect
|
||||||
|
resizeRefreshRateMs={150}
|
||||||
/>
|
/>
|
||||||
{childrenWithProps}
|
{childrenWithProps}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -50,6 +50,6 @@
|
|||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"lodash.throttle": "^4.1.1",
|
"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}
|
isPlaying={false}
|
||||||
frameRate={24}
|
frameRate={24}
|
||||||
isOverlayVisible={false}
|
isOverlayVisible={false}
|
||||||
|
// Sync resize throttle w/ sidepanel animation duration to prevent
|
||||||
|
// seizure inducing strobe blinking effect
|
||||||
|
resizeRefreshRateMs={150}
|
||||||
/>
|
/>
|
||||||
{childrenWithProps}
|
{childrenWithProps}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import cornerstone from 'cornerstone-core';
|
import cornerstone from 'cornerstone-core';
|
||||||
import cornerstoneTools from 'cornerstone-tools';
|
import cornerstoneTools from 'cornerstone-tools';
|
||||||
import CornerstoneViewport from 'react-cornerstone-viewport';
|
import CornerstoneViewport from 'react-cornerstone-viewport';
|
||||||
import OHIF, { DicomMetadataStore, utils } from '@ohif/core';
|
import OHIF, { utils } from '@ohif/core';
|
||||||
import {
|
import {
|
||||||
Notification,
|
Notification,
|
||||||
ViewportActionBar,
|
ViewportActionBar,
|
||||||
@ -345,6 +345,9 @@ function TrackedCornerstoneViewport({
|
|||||||
imageIndex: currentImageIdIndex,
|
imageIndex: currentImageIdIndex,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
// Sync resize throttle w/ sidepanel animation duration to prevent
|
||||||
|
// seizure inducing strobe blinking effect
|
||||||
|
resizeRefreshRateMs={150}
|
||||||
// TODO: ViewportGrid Context?
|
// TODO: ViewportGrid Context?
|
||||||
isActive={true} // todo
|
isActive={true} // todo
|
||||||
isStackPrefetchEnabled={true} // todo
|
isStackPrefetchEnabled={true} // todo
|
||||||
|
|||||||
@ -17900,13 +17900,14 @@ react-cornerstone-viewport@2.3.9:
|
|||||||
prop-types "^15.7.2"
|
prop-types "^15.7.2"
|
||||||
react-resize-detector "^4.2.1"
|
react-resize-detector "^4.2.1"
|
||||||
|
|
||||||
react-cornerstone-viewport@3.0.0:
|
react-cornerstone-viewport@4.0.0:
|
||||||
version "3.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-3.0.0.tgz#c7be6dc29762fc844c639a73c3292feb69e31ba5"
|
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-4.0.0.tgz#7bdec830e7207ef1f62a6135a4c92d272691592d"
|
||||||
integrity sha512-hLneVVOrZZlCkIhsKVdIHBGVPbOmeu5tsrPXaeCfsOlA5y7JhtacjuKHL4xzGmlXiCipftgiZ9+4gC2gcJSlcw==
|
integrity sha512-5fDvd147PziAaCy2tIrHOnSNJ7Yn7csK5mTul46mbG3nkzEu1KSEPh4XHGbIk2u6DUlLHViwQULVmdqu4KvRew==
|
||||||
dependencies:
|
dependencies:
|
||||||
classnames "^2.2.6"
|
classnames "^2.2.6"
|
||||||
date-fns "^2.2.1"
|
date-fns "^2.2.1"
|
||||||
|
lodash.debounce "^4.0.8"
|
||||||
prop-types "^15.7.2"
|
prop-types "^15.7.2"
|
||||||
react-resize-detector "^4.2.1"
|
react-resize-detector "^4.2.1"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user