How to use the paraview-glance/src/store/types.Mutations.SHOW_APP function in paraview-glance

To help you get started, we’ve selected a few paraview-glance examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kitware / paraview-glance / src / components / core / App / script.js View on Github external
if (this.origConsoleError) {
      window.console.error = this.origConsoleError;
    }

    shortcuts.forEach(({ key, action }) => {
      if (Actions[action]) {
        Mousetrap.unbind(key);
      }
    });

    this.pxmSub.unsubscribe();
    this.renderListener.removeListeners();
  },
  methods: Object.assign(
    mapMutations({
      showApp: Mutations.SHOW_APP,
      showLanding: Mutations.SHOW_LANDING,
      toggleLanding() {
        if (this.landingVisible) {
          this.showApp();
        } else {
          this.showLanding();
        }
      },
    }),
    mapActions({
      promptUserFiles: Actions.PROMPT_FOR_FILES,

      openSample: (dispatch, urls, names) => {
        // dispatch: delete all loaded files since this is only called
        // by clicking on sample data
        dispatch(Actions.OPEN_REMOTE_FILES, { urls, names }).then(() =>
github Kitware / paraview-glance / src / components / core / FileLoader / script.js View on Github external
closeAndTryToLoad(commit) {
        const allFilesErrored = this.files.reduce(
          (flag, { error }) => flag && error,
          true
        );
        if (!allFilesErrored) {
          commit(Mutations.SHOW_APP);
        }
        commit(Mutations.FILE_IDLE);
      },
    }),
github Kitware / paraview-glance / src / store / fileLoader.js View on Github external
function onLoadOkay(commit) {
  commit(Mutations.FILE_IDLE);
  commit(Mutations.SHOW_APP);
}
github Kitware / paraview-glance / src / app.js View on Github external
function onRoute(event) {
    const state = event.state || {};
    if (state.app) {
      store.commit(Mutations.SHOW_APP);
    } else {
      store.commit(Mutations.SHOW_LANDING);
    }
  }
  store.watch(