Skip to content

Commit 6dea9a6

Browse files
committed
refactor(cine): drop dead code left over from the effective-view refactor
- RulerTool.vue: remove orphan useImage(imageId) call (no destructure; the metadata it used to provide is now sourced via useViewLocator) - viewTypes.ts: remove getComponentFromViewInfo wrapper — no consumers after LayoutGridItem switched to resolveSlotRendering
1 parent 9431378 commit 6dea9a6

3 files changed

Lines changed: 3 additions & 22 deletions

File tree

src/components/tools/ruler/RulerTool.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
<script lang="ts">
2323
import { computed, defineComponent, onUnmounted, PropType, toRefs } from 'vue';
24-
import { useImage } from '@/src/composables/useCurrentImage';
2524
import { useToolStore } from '@/src/store/tools';
2625
import { Tools } from '@/src/store/tools/types';
2726
import { useRulerStore } from '@/src/store/tools/rulers';
@@ -68,7 +67,6 @@ export default defineComponent({
6867
6968
const { locator, frame, slice } = useViewLocator(viewId, imageId);
7069
71-
useImage(imageId);
7270
const isToolActive = computed(() => toolStore.currentTool === Tools.Ruler);
7371
const viewAxis = computed(() => getLPSAxisFromDir(viewDirection.value));
7472

src/core/annotations/locator.ts

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,17 @@ import {
1616
EffectiveView,
1717
} from '@/src/core/views/effectiveView';
1818

19-
export type Locator =
19+
type Locator =
2020
| { kind: 'none' }
2121
| {
2222
kind: 'spatial';
2323
slice: number;
2424
axis: LPSAxis;
2525
frameOfReference: FrameOfReference;
2626
}
27-
| { kind: 'temporal'; frame: number }
28-
| {
29-
kind: 'spatiotemporal';
30-
slice: number;
31-
axis: LPSAxis;
32-
frameOfReference: FrameOfReference;
33-
frame: number;
34-
};
27+
| { kind: 'temporal'; frame: number };
3528

36-
export type LocatorFields = Pick<
29+
type LocatorFields = Pick<
3730
AnnotationTool,
3831
'slice' | 'frameOfReference' | 'frame'
3932
>;
@@ -75,12 +68,6 @@ export function locatorPatch(here: Locator): LocatorFields {
7568
frameOfReference: AXIAL_FRAME_OF_REFERENCE,
7669
frame: here.frame,
7770
};
78-
case 'spatiotemporal':
79-
return {
80-
slice: here.slice,
81-
frameOfReference: here.frameOfReference,
82-
frame: here.frame,
83-
};
8471
case 'none':
8572
return {
8673
slice: -1,

src/core/viewTypes.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,3 @@ export function resolveSlotRendering(viewInfo: ViewInfo): {
4444
renderImageID: effective.renderDataID,
4545
};
4646
}
47-
48-
export function getComponentFromViewInfo(info: ViewInfo) {
49-
return resolveSlotRendering(info).component;
50-
}

0 commit comments

Comments
 (0)