Skip to content

Commit 799efbb

Browse files
author
Adriána Kohanová
committed
#462 Mass actions
1 parent 0cb5476 commit 799efbb

File tree

5 files changed

+176
-73
lines changed

5 files changed

+176
-73
lines changed

js/components/datasets/inspirationDialog.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export const InspirationDialog = memo(
258258
const removeSelectedType = (type, skipTracking = false) => {
259259
if (type === 'ligand') {
260260
moleculeList.forEach(molecule => {
261-
dispatch(removeType[type](stage, molecule, colourList[molecule.id % colourList.length], false, skipTracking));
261+
dispatch(removeType[type](stage, molecule, skipTracking));
262262
});
263263
} else {
264264
moleculeList.forEach(molecule => {

js/components/datasets/redux/dispatchActions.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,11 @@ export const removeOrAddAllHitProteinsOfList = (areAllSelected, moleculeList = [
455455

456456
if (areAllSelected) {
457457
let molecules = dispatch(getSelectedMoleculesByType(type, false, moleculeList));
458-
dispatch(setDeselectedAllByType(type, molecules));
458+
dispatch(setDeselectedAllByType(type, null, molecules, true));
459459
dispatch(removeAllHitProteins(moleculeList, stage, true));
460460
} else {
461461
let molecules = dispatch(getSelectedMoleculesByType(type, true, moleculeList));
462-
dispatch(setSelectedAllByType(type, molecules));
462+
dispatch(setSelectedAllByType(type, null, molecules, true));
463463
dispatch(addAllHitProteins(moleculeList, stage, true));
464464
}
465465
};
@@ -497,11 +497,11 @@ export const removeOrAddAllComplexesOfList = (areAllSelected, moleculeList = [],
497497

498498
if (areAllSelected) {
499499
let molecules = dispatch(getSelectedMoleculesByType(type, false, moleculeList));
500-
dispatch(setDeselectedAllByType(type, molecules));
500+
dispatch(setDeselectedAllByType(type, null, molecules, true));
501501
dispatch(removeAllComplexes(moleculeList, stage, true));
502502
} else {
503503
let molecules = dispatch(getSelectedMoleculesByType(type, true, moleculeList));
504-
dispatch(setSelectedAllByType(type, molecules));
504+
dispatch(setSelectedAllByType(type, null, molecules, true));
505505
dispatch(addAllComplexes(moleculeList, stage, true));
506506
}
507507
};

js/reducers/tracking/constants.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,16 @@ export const actionDescription = {
5757
TO_SHOPPING_CART: 'to shopping cart',
5858
FROM_SHOPPING_CART: 'from shopping cart',
5959
LIGAND: 'Ligand',
60-
SIDECHAINS: 'Sidechain',
61-
INTERACTIONS: 'Interaction',
60+
SIDECHAIN: 'Sidechain',
61+
INTERACTION: 'Interaction',
6262
VECTOR: 'Vector',
6363
SURFACE: 'Surface',
6464
SITE: 'Site',
6565
TARGET: 'Target',
66-
ALL: 'All'
66+
ALL: 'All',
67+
LIGANDS: 'Ligands',
68+
SIDECHAINS: 'Sidechains',
69+
INTERACTIONS: 'Interactions'
6770
};
6871

6972
export const actionObjectType = {

0 commit comments

Comments
 (0)