Better entrypoint for extensions
This commit is contained in:
1 parent
2429294dda
commit
c05058a0f5
3 files changed
+32
-18
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import './config';
|
||||
// Imported flat feature since is not transpiled for old browser versions
|
||||
// Polyfills
|
||||
import 'core-js/features/array/flat';
|
||||
import 'core-js/stable';
|
||||
import 'regenerator-runtime/runtime';
|
||||
@@ -23,7 +23,6 @@ import initCornerstoneTools from './initCornerstoneTools.js';
|
||||
import { GenericViewerCommands, MeasurementsPanel } from './appExtensions';
|
||||
import OHIFCornerstoneExtension from '@ohif/extension-cornerstone';
|
||||
import OHIFStandaloneViewer from './OHIFStandaloneViewer';
|
||||
// ~~ EXTENSIONS
|
||||
import { OidcProvider } from 'redux-oidc';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Provider } from 'react-redux';
|
||||
@@ -131,6 +130,9 @@ class App extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param
|
||||
*/
|
||||
function _initExtensions(extensions) {
|
||||
const defaultExtensions = [
|
||||
GenericViewerCommands,
|
||||
@@ -140,13 +142,6 @@ function _initExtensions(extensions) {
|
||||
const mergedExtensions = defaultExtensions.concat(extensions);
|
||||
extensionManager.registerExtensions(mergedExtensions);
|
||||
|
||||
// [
|
||||
// OHIFVTKExtension,
|
||||
// OHIFDicomPDFExtension,
|
||||
// OHIFDicomHtmlExtension,
|
||||
// OHIFDicomMicroscopyExtension,
|
||||
// ]
|
||||
|
||||
// Must run after extension commands are registered
|
||||
if (window.config.hotkeys) {
|
||||
hotkeysManager.setHotkeys(window.config.hotkeys, true);
|
||||
@@ -160,6 +155,4 @@ function _initServers(servers) {
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
||||
// Make our managers accessible
|
||||
export { commandsManager, extensionManager, hotkeysManager };
|
||||
Reference in new issue
Block a user