Add obs index to label file (#928)

* remove debug logging

* load and save obs/row index in label file

* lint

* update tests
This commit is contained in:
Bruce Martin
2019-09-19 09:16:01 -07:00
committed by GitHub
parent 197ea9214a
commit 109c9e70ec
5 changed files with 23 additions and 26 deletions
-9
View File
@@ -13,7 +13,6 @@ const Annotations = (
switch (action.type) {
/* CATEGORY */
case "annotation: activate add new label mode":
console.log(action.type, action);
return {
...state,
isAddingNewLabel: true,
@@ -26,28 +25,24 @@ const Annotations = (
categoryAddingNewLabel: null
};
case "annotation: add new label to category":
console.log(action.type, action);
return {
...state,
isAddingNewLabel: false,
categoryAddingNewLabel: null
};
case "annotation: activate category edit mode":
console.log(action.type, action);
return {
...state,
isEditingCategoryName: true,
categoryEditable: action.data
};
case "annotation: disable category edit mode":
console.log(action.type, action);
return {
...state,
isEditingCategoryName: false,
categoryEditable: null
};
case "annotation: category edited":
console.log(action.type, action);
return {
...state,
isEditingCategoryName: true,
@@ -56,7 +51,6 @@ const Annotations = (
/* LABEL */
case "annotation: activate edit label mode":
console.log(action.type, action);
return {
...state,
isEditingLabelName: true,
@@ -66,19 +60,16 @@ const Annotations = (
}
};
case "annotation: cancel edit label mode":
console.log(action.type, action);
return {
...state,
isEditingLabelName: false,
labelEditable: { category: null, label: null }
};
case "annotation: label edited":
console.log(action.type, action);
return {
...state,
isEditingLabelName: false,
labelEditable: { category: null, label: null }
/* Bruce to persist new label name */
};
default:
return state;