From 9b030e8ea0e3da9e0aa2ed3cab55a59fc76ff1e4 Mon Sep 17 00:00:00 2001 From: Forrest Date: Thu, 14 Sep 2023 14:17:56 -0400 Subject: [PATCH] fix(AnnotationTool): drop color property color property is superceded by the label. --- src/components/tools/createAnnotationToolComponent.ts | 5 ----- src/config.ts | 9 --------- src/store/tools/useAnnotationTool.ts | 2 -- 3 files changed, 16 deletions(-) diff --git a/src/components/tools/createAnnotationToolComponent.ts b/src/components/tools/createAnnotationToolComponent.ts index f08fe32d0..5ad6fde5b 100644 --- a/src/components/tools/createAnnotationToolComponent.ts +++ b/src/components/tools/createAnnotationToolComponent.ts @@ -73,16 +73,11 @@ export function createAnnotationToolComponent< const onToolPlaced = (initState: object) => { if (!currentImageID.value) return; - // TODO drop color property - const { color } = activeLabel.value - ? (toolStore.labels[activeLabel.value] as any) - : { color: undefined }; toolStore.addTool({ imageID: currentImageID.value, frameOfReference: currentFrameOfReference.value, slice: currentSlice.value, label: activeLabel.value, - color, ...initState, }); }; diff --git a/src/config.ts b/src/config.ts index 180b91a1b..5fb6b3a0f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -171,15 +171,6 @@ export const SAMPLE_DATA: SampleDataset[] = [ }, ]; -export const TOOL_COLORS = [ - '#58f24c', - '#8de4d3', - '#f0a4b1', - '#a3c9fe', - '#c8f251', - '#fea53b', -]; - export const RULER_LABEL_DEFAULTS = { red: { color: 'red' }, green: { color: '#00ff00' }, diff --git a/src/store/tools/useAnnotationTool.ts b/src/store/tools/useAnnotationTool.ts index bd63865be..d725b8a6b 100644 --- a/src/store/tools/useAnnotationTool.ts +++ b/src/store/tools/useAnnotationTool.ts @@ -2,7 +2,6 @@ import { Ref, UnwrapNestedRefs, computed, ref, watch } from 'vue'; import { Store, StoreActions, StoreGetters, StoreState } from 'pinia'; import { Maybe, PartialWithRequired } from '@/src/types'; -import { TOOL_COLORS } from '@/src/config'; import { removeFromArray } from '@/src/utils'; import { useCurrentImage } from '@/src/composables/useCurrentImage'; import { frameOfReferenceToImageSliceAndAxis } from '@/src/utils/frameOfReference'; @@ -23,7 +22,6 @@ const makeAnnotationToolDefaults = () => ({ slice: -1, imageID: '', placing: false, - color: TOOL_COLORS[0], name: 'baseAnnotationTool', });