[OHIF 284] - JumpToMeasurement + prevent layout change on scroll Prevent layout change on scroll (#1889)
* No more setting on debounce, jumpToMeasurement service set up. * Fix bug causing a race condition sometimes if you click super fast. * Optimise rendering of Tracking viewport slightly. * element => targetElement * Remove complete TODO * Respond to reviewer comments. * Fix e2e workflow. * Fix regression that removed highlighting on jump to. * Make sure jump to works from panel as well as viewport. * Fix typo and remove debugger. Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
This commit is contained in:
1 parent
4985fbf5a6
commit
a4f286feee
26 files changed
+438
-196
No files matched your search
@@ -27,14 +27,10 @@ export function ViewportGridProvider({ children, service }) {
|
||||
return { ...state, ...{ activeViewportIndex: action.payload } };
|
||||
}
|
||||
case 'SET_DISPLAYSET_FOR_VIEWPORT': {
|
||||
const {
|
||||
viewportIndex,
|
||||
displaySetInstanceUID,
|
||||
imageIndex,
|
||||
} = action.payload;
|
||||
const { viewportIndex, displaySetInstanceUID } = action.payload;
|
||||
const viewports = state.viewports.slice();
|
||||
|
||||
viewports[viewportIndex] = { displaySetInstanceUID, imageIndex };
|
||||
viewports[viewportIndex] = { displaySetInstanceUID };
|
||||
|
||||
return { ...state, ...{ viewports }, cachedLayout: null };
|
||||
}
|
||||
@@ -63,7 +59,7 @@ export function ViewportGridProvider({ children, service }) {
|
||||
numCols: 1,
|
||||
numRows: 1,
|
||||
activeViewportIndex: 0,
|
||||
viewports: [{ displaySetInstanceUID: null, imageIndex: null }],
|
||||
viewports: [{ displaySetInstanceUID: null }],
|
||||
cachedLayout: null,
|
||||
};
|
||||
}
|
||||
@@ -96,13 +92,12 @@ export function ViewportGridProvider({ children, service }) {
|
||||
[dispatch]
|
||||
);
|
||||
const setDisplaysetForViewport = useCallback(
|
||||
({ viewportIndex, displaySetInstanceUID, imageIndex }) =>
|
||||
({ viewportIndex, displaySetInstanceUID }) =>
|
||||
dispatch({
|
||||
type: 'SET_DISPLAYSET_FOR_VIEWPORT',
|
||||
payload: {
|
||||
viewportIndex,
|
||||
displaySetInstanceUID,
|
||||
imageIndex,
|
||||
},
|
||||
}),
|
||||
[dispatch]
|
||||
|
||||
Reference in new issue
Block a user