PLUGIN_TYPES --> MODULE_TYPES
This commit is contained in:
1 parent
29f86d41e6
commit
9c797233bb
4 files changed
+12
-21
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { LayoutManager } from 'react-viewerbase';
|
||||
import OHIF from 'ohif-core';
|
||||
import { MODULE_TYPES } from 'ohif-core';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const viewportPluginIds = state.plugins.availablePlugins
|
||||
.filter(plugin => plugin.type === OHIF.plugins.PLUGIN_TYPES.VIEWPORT)
|
||||
.filter(plugin => plugin.type === MODULE_TYPES.VIEWPORT)
|
||||
.map(plugin => plugin.id);
|
||||
|
||||
const availablePlugins = {};
|
||||
@@ -17,7 +17,7 @@ const mapStateToProps = state => {
|
||||
}
|
||||
});
|
||||
|
||||
// TODO Use something like state.plugins.defaultPlugin[OHIF.plugins.PLUGIN_TYPES.VIEWPORT]
|
||||
// TODO Use something like state.plugins.defaultPlugin[MODULE_TYPES.VIEWPORT]
|
||||
let defaultPlugin;
|
||||
if (viewportPluginIds && viewportPluginIds.length) {
|
||||
defaultPlugin = viewportPluginIds[0];
|
||||
|
||||
@@ -4,7 +4,7 @@ import React, { Component } from 'react';
|
||||
|
||||
import ConnectedLayoutButton from './ConnectedLayoutButton';
|
||||
import ConnectedPluginSwitch from './ConnectedPluginSwitch.js';
|
||||
import OHIF from 'ohif-core';
|
||||
import { MODULE_TYPES } from 'ohif-core';
|
||||
import PropTypes from 'prop-types';
|
||||
import { RoundedButtonGroup } from 'react-viewerbase';
|
||||
|
||||
@@ -57,10 +57,9 @@ class ToolbarRow extends Component {
|
||||
|
||||
const currentPluginId = this.props.pluginId;
|
||||
|
||||
const { PLUGIN_TYPES, availablePlugins } = OHIF.plugins;
|
||||
const plugin = availablePlugins.find(entry => {
|
||||
return (
|
||||
entry.type === PLUGIN_TYPES.TOOLBAR && entry.id === currentPluginId
|
||||
entry.type === MODULE_TYPES.TOOLBAR && entry.id === currentPluginId
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user