Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillReceiveProps(nextProps) {
if (nextProps.remoteRendering !== this.props.remoteRendering) {
if (nextProps.remoteRendering) {
// Changing back to remote rendering
const params = this.renderer.getCameraParameters();
this.props.updateCamera(
this.props.viewId,
params.focalPoint,
params.viewUp,
params.position
);
}
ImageProviders.reset();
this.needsSetImageProvider = true;
}
}