diff --git a/client/src/reducers/colors.js b/client/src/reducers/colors.js index 8c131600..723f299b 100644 --- a/client/src/reducers/colors.js +++ b/client/src/reducers/colors.js @@ -53,6 +53,18 @@ const ColorsReducer = ( }; } + case "annotation: delete category": { + const { colorAccessor } = state; + if (action.metadataField != colorAccessor) { + return state; + } + /* else reset */ + return { + ...state, + ...ColorHelpers.resetColors(prevSharedState.world) + }; + } + case "reset colorscale": { return { ...state,