How to use the paraview-lite/src/stores/types.Actions.PROXY_UPDATE function in paraview-lite

To help you get started, we’ve selected a few paraview-lite 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 / light-viz / src / proxyHelper.js View on Github external
function apply() {
    if (this.create) {
      return;
    }
    if (this.isNetworkBusy && !scheduledApply) {
      scheduledApply = setTimeout(() => {
        scheduledApply = null;
        apply.apply(this);
      }, 100);
    }
    if (this.isNetworkBusy < 3 && hasChange()) {
      // console.log('apply', JSON.stringify(changeSet, null, 2));
      store.dispatch(Actions.PROXY_UPDATE, changeSet);
      store.dispatch(Actions.PROXY_DATA_FETCH, {
        proxyId: this[`active${proxyType}Id`],
        needUI: false,
      });
    }
  }
github Kitware / light-viz / src / components / core / ControlsDrawer / script.js View on Github external
},
    mapGetters({
      autoApply: Getters.APP_AUTO_APPLY,
      panel: Getters.MODULES_ACTIVE,
      pipeline: Getters.PROXY_PIPELINE,
      selectedSources: Getters.PROXY_SELECTED_IDS,
      proxyToPanel: Getters.PROXY_TO_MODULE_MAP,
      proxyToName: Getters.PROXY_NAME_MAP,
      moduleMap: Getters.MODULES_MAP,
      sourceToRepresentationMap: Getters.PROXY_SOURCE_TO_REPRESENTATION_MAP,
    })
  ),
  methods: Object.assign(
    mapActions({
      updatePipeline: Actions.PROXY_PIPELINE_FETCH,
      updateProxy: Actions.PROXY_UPDATE,
    }),
    mapMutations({
      updateSelectedSource: Mutations.PROXY_SELECTED_IDS_SET,
    }),
    {
      updateVisibility({ id, visible }) {
        this.updateProxy([
          {
            id: this.sourceToRepresentationMap[id],
            value: visible ? 1 : 0,
            name: 'Visibility',
          },
        ]);
      },
    }
  ),