fix(segmentation): upgrade cs3d to fix various segmentation bugs (#3885)
This commit is contained in:
1 parent
a8a0bdb2df
commit
b1efe40aa1
26 files changed
+241
-171
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import React, {useEffect, useCallback, useMemo} from 'react';
|
||||
import React, { useEffect, useCallback } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ServicesManager, Types, MeasurementService } from '@ohif/core';
|
||||
import { ViewportGrid, ViewportPane, useViewportGrid } from '@ohif/ui';
|
||||
@@ -9,6 +9,7 @@ import { useAppConfig } from '@state';
|
||||
function ViewerViewportGrid(props) {
|
||||
const { servicesManager, viewportComponents, dataSource } = props;
|
||||
const [viewportGrid, viewportGridService] = useViewportGrid();
|
||||
const [appConfig] = useAppConfig();
|
||||
|
||||
const { layout, activeViewportId, viewports } = viewportGrid;
|
||||
const { numCols, numRows } = layout;
|
||||
@@ -18,18 +19,6 @@ function ViewerViewportGrid(props) {
|
||||
servicesManager as ServicesManager
|
||||
).services;
|
||||
|
||||
/**
|
||||
* Determine whether users need to use the tools directly, or whether they need to click once to activate the viewport before using tools.
|
||||
* If 'activateViewportBeforeInteraction' is available in the 'window.config' object, use its value;
|
||||
* otherwise, default to true.
|
||||
* If true, users need to click once to activate the viewport before using the tools.
|
||||
* if false, tools can be used directly.
|
||||
*/
|
||||
const activateViewportBeforeInteraction = useMemo(() => {
|
||||
const [appConfig] = useAppConfig();
|
||||
return appConfig?.activateViewportBeforeInteraction ?? true;
|
||||
}, []);
|
||||
|
||||
/**
|
||||
* This callback runs after the viewports structure has changed in any way.
|
||||
* On initial display, that means if it has changed by applying a HangingProtocol,
|
||||
@@ -324,7 +313,8 @@ function ViewerViewportGrid(props) {
|
||||
<div
|
||||
data-cy="viewport-pane"
|
||||
className={classNames('flex h-full w-full flex-col', {
|
||||
'pointer-events-none': !isActive && activateViewportBeforeInteraction,
|
||||
'pointer-events-none':
|
||||
!isActive && (appConfig?.activateViewportBeforeInteraction ?? true),
|
||||
})}
|
||||
>
|
||||
<ViewportComponent
|
||||
|
||||
Reference in new issue
Block a user