Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function createViewer(
container,
config = createConfigurationFromURLArgs()
) {
const store = createStore();
store.commit(Mutations.NETWORK_CONFIG_SET, config);
registerModules(store);
setInterval(() => store.dispatch(Actions.BUSY_UPDATE_PROGRESS, 1), 50);
// Fetch preset images
store.commit(Mutations.COLOR_PRESET_NAMES_SET, [
'Cool to Warm',
'Cool to Warm (Extended)',
'Rainbow Desaturated',
'Cold and Hot',
'erdc_rainbow_bright',
'2hot',
'erdc_iceFire_H',
'erdc_iceFire_L',
'Inferno (matplotlib)',
]);
/* eslint-disable no-new *//**
* Sets the active proxy configuration to be used by createViewer.
*
* Once createViewer() is called, setActiveProxyConfiguration will do nothing.
* Proxy config precedence (decreasing order):
* createViewer param, active proxy config, Generic config
*/
function createConfigurationFromURLArgs(
addOn = { application: 'paraview-lite' }
) {
return Object.assign({}, vtkURLExtract.extractURLParameters(), addOn);
}
const store = createStore();
store.commit('PVL_NETWORK_CONFIG_SET', createConfigurationFromURLArgs());
registerModules(store);
setInterval(() => store.dispatch('PVL_BUSY_UPDATE_PROGRESS', 1), 50);
// Fetch preset images
store.commit('PVL_COLOR_PRESET_NAMES_SET', [
'Cool to Warm',
'Cool to Warm (Extended)',
'Rainbow Desaturated',
'Cold and Hot',
'erdc_rainbow_bright',
'2hot',
'erdc_iceFire_H',
'erdc_iceFire_L',
'Inferno (matplotlib)',
]);
new Vue({