All files / tools/src/eventListeners/segmentation segmentationRepresentationModifiedListener.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                428x     1096x   1096x        
import type { SegmentationRepresentationModifiedEventType } from '../../types/EventTypes';
import { triggerSegmentationRender } from '../../stateManagement/segmentation/SegmentationRenderingEngine';
 
/**
 * A function that listens to the `segmentationRepresentationModified` event and triggers
 * the triggerSegmentationRender
 * @param evt - The event object
 */
const segmentationRepresentationModifiedListener = function (
  evt: SegmentationRepresentationModifiedEventType
): void {
  const { viewportId } = evt.detail;
 
  triggerSegmentationRender(viewportId);
};
 
export default segmentationRepresentationModifiedListener;