Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
// 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);
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();
},
};