Skip to content

Commit

Permalink
Merge pull request #428 from datavisyn/ochampari/hide_session_managme…
Browse files Browse the repository at this point in the history
…nt_option
  • Loading branch information
thinkh authored Oct 1, 2020
2 parents 5f4b118 + c180f39 commit 6e6c47e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
5 changes: 5 additions & 0 deletions dist/ATDPApplication.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions dist/ATDPApplication.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ATDPApplication.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 18 additions & 8 deletions src/ATDPApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,34 @@ export interface ITDPOptions {
showAboutLink: boolean | ((title: HTMLElement, content: HTMLElement) => void);

/**
* show/hide the options link
* default: false
* Show/hide the options link
* @default: false
*/
showOptionsLink: boolean | ((title: HTMLElement, content: HTMLElement) => void);

/**
* show/hide the bug report link
* default: true
* Show/hide the bug report link
* @default: true
*/
showReportBugLink: boolean | ((title: HTMLElement, content: HTMLElement) => void);

/**
* show help link true or the url to link
* default: false
* Show help link (`true`) or the url to link
* @default: false
*/
showHelpLink: boolean | string;

/**
* Show/hide the `Analysis Session Managment` menu in the header
* @default: true
*/
showProvenanceMenu?: boolean;

/**
* default: true
*/
enableProvenanceUrlTracking?: boolean;

/**
* options passed to the IProvenanceGraphManager
*/
Expand Down Expand Up @@ -174,8 +181,11 @@ export abstract class ATDPApplication<T> extends ACLUEWrapper {
// reopen after logged out
this.loginMenu.forceShowDialog();
});
let provenanceMenu: EditProvenanceGraphMenu | null;

const provenanceMenu = new EditProvenanceGraphMenu(clueManager, this.header.rightMenu);
if (this.options.showProvenanceMenu) {
provenanceMenu = new EditProvenanceGraphMenu(clueManager, this.header.rightMenu);
}

const modeSelector = body.querySelector('header');
modeSelector.classList.add('collapsed');
Expand All @@ -197,7 +207,7 @@ export abstract class ATDPApplication<T> extends ACLUEWrapper {
ButtonModeSelector.createButton(modeSelector, {
size: 'sm'
});
provenanceMenu.setGraph(graph);
provenanceMenu?.setGraph(graph);
});

const provVis = VisLoader.loadProvenanceGraphVis(graph, content, {
Expand Down

0 comments on commit 6e6c47e

Please sign in to comment.