Skip to content

Commit

Permalink
Merge pull request #207 from datavisyn/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
dg-datavisyn authored Sep 5, 2019
2 parents c148309 + 8e2fd9b commit d8216da
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tdp_core",
"description": "Target discovery platform for exploring rankings of genes, disease models, and other entities.",
"homepage": "https://phovea.caleydo.org",
"version": "5.4.0",
"version": "5.4.1",
"author": {
"name": "datavisyn",
"email": "contact@caleydo.org",
Expand Down
81 changes: 68 additions & 13 deletions src/phovea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,26 @@
import {IRegistry} from 'phovea_core/src/plugin';

export default function (registry: IRegistry) {
function actionFunction(id: string, factory: string, loader: () => any) {
registry.push('actionFunction', id, loader, { factory });
function actionFunction(id: string, factory: string, loader: () => any, options?: {}) {
registry.push('actionFunction', id, loader, { factory, ...options });
}

function actionCompressor(id: string, factory: string, matches: string, loader: () => any) {
registry.push('actionCompressor', id, loader, { factory, matches });
}

actionFunction('tdpInitSession', 'initSessionImpl', () => System.import('./internal/cmds'));
actionFunction('tdpSetParameter', 'setParameterImpl', () => System.import('./internal/cmds'));
actionFunction('tdpInitSession', 'initSessionImpl', () => System.import('./internal/cmds'), {
analytics: {
category: 'session',
action: 'init'
}
});
actionFunction('tdpSetParameter', 'setParameterImpl', () => System.import('./internal/cmds'), {
analytics: {
category: 'view',
action: 'setParameter'
}
});
actionCompressor('tdpCompressSetParameter', 'compressSetParameter', '(tdpSetParameter)', () => System.import('./internal/cmds'));

// compatibility
Expand All @@ -24,20 +34,65 @@ export default function (registry: IRegistry) {
actionCompressor('targidCompressSetParameter', 'compressSetParameterOld', '(targidSetParameter)', () => System.import('./internal/cmds'));


actionFunction('tdpAddScore', 'addScoreImpl', () => System.import('./lineup/internal/scorecmds'));
actionFunction('tdpRemoveScore', 'removeScoreImpl', () => System.import('./lineup/internal/scorecmds'));
actionFunction('tdpAddScore', 'addScoreImpl', () => System.import('./lineup/internal/scorecmds'), {
analytics: {
category: 'score',
action: 'add'
}
});
actionFunction('tdpRemoveScore', 'removeScoreImpl', () => System.import('./lineup/internal/scorecmds'), {
analytics: {
category: 'score',
action: 'remove'
}
});
actionCompressor('tdpScoreCompressor', 'compress', '(tdpAddScore|tdpRemoveScore)', () => System.import('./lineup/internal/scorecmds'));

// compatibility
actionFunction('ordinoAddScore', 'addScoreImpl', () => System.import('./lineup/internal/scorecmds'));
actionFunction('ordinoRemoveScore', 'removeScoreImpl', () => System.import('./lineup/internal/scorecmds'));
actionCompressor('ordinoScoreCompressor', 'compressComp', '(ordinoAddScore|ordinoRemoveScore)', () => System.import('./lineup/internal/scorecmds'));

actionFunction('lineupAddRanking', 'addRankingImpl', () => System.import('./lineup/internal/cmds'));
actionFunction('lineupSetRankingSortCriteria', 'setRankingSortCriteriaImpl', () => System.import('./lineup/internal/cmds'));
actionFunction('lineupSetSortCriteria', 'setSortCriteriaImpl', () => System.import('./lineup/internal/cmds'));
actionFunction('lineupSetGroupCriteria', 'setGroupCriteriaImpl', () => System.import('./lineup/internal/cmds'));
actionFunction('lineupSetColumn', 'setColumnImpl', () => System.import('./lineup/internal/cmds'));
actionFunction('lineupAddColumn', 'addColumnImpl', () => System.import('./lineup/internal/cmds'));
actionFunction('lineupMoveColumn', 'moveColumnImpl', () => System.import('./lineup/internal/cmds'));
actionFunction('lineupAddRanking', 'addRankingImpl', () => System.import('./lineup/internal/cmds'), {
analytics: {
category: 'lineup',
action: 'addRanking'
}
});
actionFunction('lineupSetRankingSortCriteria', 'setRankingSortCriteriaImpl', () => System.import('./lineup/internal/cmds'), {
analytics: {
category: 'lineup',
action: 'setRankingSortCriteria'
}
});
actionFunction('lineupSetSortCriteria', 'setSortCriteriaImpl', () => System.import('./lineup/internal/cmds'), {
analytics: {
category: 'lineup',
action: 'setSortCriteria'
}
});
actionFunction('lineupSetGroupCriteria', 'setGroupCriteriaImpl', () => System.import('./lineup/internal/cmds'), {
analytics: {
category: 'lineup',
action: 'setGroupCriteria'
}
});
actionFunction('lineupSetColumn', 'setColumnImpl', () => System.import('./lineup/internal/cmds'), {
analytics: {
category: 'lineup',
action: 'setColumn'
}
});
actionFunction('lineupAddColumn', 'addColumnImpl', () => System.import('./lineup/internal/cmds'), {
analytics: {
category: 'lineup',
action: 'addColumn'
}
});
actionFunction('lineupMoveColumn', 'moveColumnImpl', () => System.import('./lineup/internal/cmds'), {
analytics: {
category: 'lineup',
action: 'moveColumn'
}
});
}
9 changes: 9 additions & 0 deletions src/views/SelectionChooser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,13 @@ export default class SelectionChooser {
return changed;
}

/**
* change the selected value programmatically
*/
setSelection(value: any) {
const element = <IFormSelectElement>this.accessor(this.formID);

element.value = value;
}

}

0 comments on commit d8216da

Please sign in to comment.