mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 14:28:11 +08:00
undo/redo cleanup (#1165)
* fix refactoring error which disabled annotation file clearing * fix undo behavior on add category label * fix various undo/redo bugs * remove logging * further refinement of annotation undo/redo and actions * address PR comment
This commit is contained in:
@@ -80,15 +80,6 @@ const Annotations = (
|
||||
isAddingNewLabel: false,
|
||||
categoryAddingNewLabel: null
|
||||
};
|
||||
/* this handles both cases, since at this point it's just a string */
|
||||
case "annotation: add new label to category":
|
||||
return {
|
||||
...state,
|
||||
isAddingNewLabel: false,
|
||||
categoryAddingNewLabel: null,
|
||||
isAddingNewLabelFromOntology: false,
|
||||
categoryAddingNewLabelFromOntology: null
|
||||
};
|
||||
case "annotation: activate category edit mode":
|
||||
return {
|
||||
...state,
|
||||
@@ -101,12 +92,6 @@ const Annotations = (
|
||||
isEditingCategoryName: false,
|
||||
categoryBeingEdited: null
|
||||
};
|
||||
case "annotation: category edited":
|
||||
return {
|
||||
...state,
|
||||
isEditingCategoryName: false,
|
||||
categoryBeingEdited: null
|
||||
};
|
||||
|
||||
/* LABEL */
|
||||
case "annotation: activate edit label mode":
|
||||
@@ -124,12 +109,6 @@ const Annotations = (
|
||||
isEditingLabelName: false,
|
||||
labelEditable: { category: null, label: null }
|
||||
};
|
||||
case "annotation: label edited":
|
||||
return {
|
||||
...state,
|
||||
isEditingLabelName: false,
|
||||
labelEditable: { category: null, label: null }
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user