Skip to content

Commit

Permalink
fix(index): Set app mode as url parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Mar 29, 2018
1 parent 742d1be commit 78bef95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export const {
} = ReaderFactory;
export const { registerControlTab, unregisterControlTab } = Controls;

export function createViewer(container, proxyConfiguration = Configs.Generic) {
export function createViewer(container, proxyConfig = null) {
const { mode } = vtkURLExtract.extractURLParameters();
const proxyConfiguration = proxyConfig || Configs[mode] || Configs.Generic;

const proxyManager = vtkProxyManager.newInstance({ proxyConfiguration });
const mainView = ReactDOM.render(
<MainView proxyManager={proxyManager} />,
Expand Down

0 comments on commit 78bef95

Please sign in to comment.