Skip to content

Commit

Permalink
fix(AnnotationTool): drop color property
Browse files Browse the repository at this point in the history
color property is superceded by the label.
  • Loading branch information
floryst committed Sep 14, 2023
1 parent 688b696 commit 9b030e8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions src/components/tools/createAnnotationToolComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
};
Expand Down
9 changes: 0 additions & 9 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
2 changes: 0 additions & 2 deletions src/store/tools/useAnnotationTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -23,7 +22,6 @@ const makeAnnotationToolDefaults = () => ({
slice: -1,
imageID: '',
placing: false,
color: TOOL_COLORS[0],
name: 'baseAnnotationTool',
});

Expand Down

0 comments on commit 9b030e8

Please sign in to comment.