Skip to content

Commit

Permalink
Merge pull request #235 from datavisyn/keckelt/comments
Browse files Browse the repository at this point in the history
Comments for ARankingView
  • Loading branch information
Christian Lehner authored Nov 8, 2019
2 parents 61c18f8 + 4ed0e7e commit 7998c6b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export interface IViewGroupExtensionDesc extends IPluginDesc {


export interface ISelection {
readonly idtype: IDType;
readonly idtype: IDType; // see phovea_core/src/idtype/manager#resolve
readonly range: Range;

/**
Expand All @@ -175,7 +175,7 @@ export interface ISelection {

export interface IViewContext {
readonly graph: ProvenanceGraph;
readonly desc: IViewPluginDesc;
readonly desc: IViewPluginDesc; // see tdp_core/src/views/interfaces#toViewPluginDesc and phovea_core/src/plugin#get
readonly ref: IObjectRef<any>;
}

Expand Down
16 changes: 16 additions & 0 deletions src/lineup/ARankingView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export interface IARankingViewOptions {

/**
* base class for views based on LineUp
* There is also AEmbeddedRanking to display simple rankings with LineUp.
*/
export abstract class ARankingView extends AView {

Expand Down Expand Up @@ -158,6 +159,17 @@ export abstract class ARankingView extends AView {

private readonly selectionAdapter: ISelectionAdapter | null;

/**
* Creates a RankingView with the given selection.
* Can be wrapped with a ViewWrapper.
*
* @remarks You need to call init() to actually display the Ranking View.
*
* @param context with provenance graph to store the executed operations
* @param selection The Ids and IdType of the selection
* @param parent where to put the ranking view
* @param options to configure the ranking view
*/
constructor(context: IViewContext, selection: ISelection, parent: HTMLElement, options: Partial<IARankingViewOptions> = {}) {
super(context, selection, parent);

Expand Down Expand Up @@ -247,6 +259,10 @@ export abstract class ARankingView extends AView {
this.selectionAdapter = this.createSelectionAdapter();
}

/**
* @param params Seperate element that displays the "Showing x of y ..." message
* @param onParameterChange eventlistener for content changes
*/
init(params: HTMLElement, onParameterChange: (name: string, value: any, previousValue: any) => Promise<any>) {
return super.init(params, onParameterChange).then(() => {
// inject stats
Expand Down

0 comments on commit 7998c6b

Please sign in to comment.