Viewers
Viewers copied to clipboard
v3-stable jumpToMeasurement applies to all viewports rather than just active viewport
Before Creating an issue
- Are you running the latest version? Yes v3-stable
- Are you reporting to the correct repository? Yes
- Did you search existing issues? Yes
Bug Report
Describe the Bug
When there are multiple viewports with annotations, clicking a measurement to activate the jumpToMeasurement
function will change all viewports. I believe the expected behavior is that only the active viewport should change.
What steps can we follow to reproduce the bug?
- Open up public link
- Create a 1x2
- Make a tracked annotation
- Click on the tracked annotation panel (both viewports will jump rather than just the active one)
Checking that viewportIndex === vI
will change the behavior as previous v3-stable. (I'm unsure if jumpToSlice behavior is actually a bug or specific to PET/CT fusion in the TMTV mode)
function _subscribeToJumpToMeasurementEvents(
MeasurementService,
DisplaySetService,
elementRef,
viewportIndex,
displaySets,
viewportGridService
) {
const displaysUIDs = displaySets.map(
displaySet => displaySet.displaySetInstanceUID
);
const { unsubscribe } = MeasurementService.subscribe(
MeasurementService.EVENTS.JUMP_TO_MEASUREMENT,
({ measurement, viewportIndex: vI }) => {
if (!measurement) return;
// Jump the the measurement if the viewport contains the displaySetUID (fusion)
if (displaysUIDs.includes(measurement.displaySetInstanceUID) && vI === viewportIndex) {
_jumpToMeasurement(
measurement,
elementRef,
viewportIndex,
MeasurementService,
DisplaySetService,
viewportGridService
);
}
}
);
return unsubscribe;
}
@jbocce ditto
In master at this point in time, only one viewport performs the jump to measurement:
- if there is a viewport on screen that contains the measurement clicked, that viewport will navigate to the image with the measurement
- if there is NOT a viewport on screen that contains the measurement clicked, then the active viewport will switch to the series containing the image with the measurement and will subsequently navigate to the image with the measurement