How to use the paraview-lite/src/stores/types.Actions.VIEW_RESET_CAMERA 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 / stores / proxy.js View on Github external
}

              // Fetch representation data if not available
              if (!state.proxyDataMap[proxy.rep]) {
                dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.rep });
              }

              // Fetch representation name if not available
              if (!state.proxyNames[proxy.rep]) {
                dispatch(Actions.PROXY_NAME_FETCH, proxy.rep);
              }
            });

            // If only one source trigger a reset camera
            if (sources.length === 1) {
              dispatch(Actions.VIEW_RESET_CAMERA);
            }

            // Fetch new time values
            dispatch(Actions.TIME_FETCH_VALUES);
          })
          .catch(console.error);
github Kitware / light-viz / src / components / core / View / script.js View on Github external
if (focalPoint) {
          camera.setFocalPoint(...focalPoint);
        }
        if (viewUp) {
          camera.setViewUp(...viewUp);
        }
        if (centerOfRotation) {
          this.view
            .getInteractorStyle3D()
            .setCenterOfRotation(centerOfRotation);
        }
      },
    },
    mapActions({
      updateOrientation: Actions.VIEW_UPDATE_ORIENTATION,
      resetCamera: Actions.VIEW_RESET_CAMERA,
      rollLeft: Actions.VIEW_ROLL_LEFT,
      rollRight: Actions.VIEW_ROLL_RIGHT,
    })
  ),
  beforeDestroy() {
    this.viewStream.delete();
    this.view.delete();
  },
};