still broken

This commit is contained in:
Erik Ziegler 2020-05-18 18:11:24 +02:00
parent 7a8418f64b
commit 4e683ecdde
3 changed files with 9 additions and 19 deletions

View File

@ -60,7 +60,10 @@ module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
alias: { alias: {
// Viewer project // Viewer project
'@routes': path.resolve(__dirname, '../platform/viewer/src/routes'), '@routes': path.resolve(__dirname, '../platform/viewer/src/routes'),
'@components': path.resolve(__dirname, '../platform/viewer/src/components'), '@components': path.resolve(
__dirname,
'../platform/viewer/src/components'
),
}, },
// Which directories to search when resolving modules // Which directories to search when resolving modules
modules: [ modules: [

View File

@ -27,12 +27,10 @@ function ViewerLayout({
leftPanels, leftPanels,
rightPanels, rightPanels,
viewports, viewports,
children, children: ViewportGrid,
}) { }) {
const [displaySets, setDisplaySets] = useState({}); const [displaySets, setDisplaySets] = useState({});
console.log(children);
debugger;
/** /**
* Set body classes (tailwindcss) that don't allow vertical * Set body classes (tailwindcss) that don't allow vertical
* or horizontal overflow (no scrolling). Also guarantee window * or horizontal overflow (no scrolling). Also guarantee window
@ -81,7 +79,9 @@ function ViewerLayout({
// TODO -> make toolbar service // TODO -> make toolbar service
const toolBarLayout = { tools: [], moreTools: [] }; const toolBarLayout = { tools: [], moreTools: [] };
const [primaryToolBarLayout, secondaryToolBarLayout] = toolBarLayout; //const [primaryToolBarLayout, secondaryToolBarLayout] = toolBarLayout;
const primaryToolBarLayout = toolBarLayout;
const secondaryToolBarLayout = toolBarLayout;
return ( return (
<div> <div>
@ -105,7 +105,7 @@ function ViewerLayout({
<Toolbar type="secondary" tools={secondaryToolBarLayout.tools} /> <Toolbar type="secondary" tools={secondaryToolBarLayout.tools} />
</div> </div>
<div className="flex flex-1 h-full overflow-hidden bg-black items-center justify-center pb-2 pt-1"> <div className="flex flex-1 h-full overflow-hidden bg-black items-center justify-center pb-2 pt-1">
<children.ViewportGrid <ViewportGrid
servicesManager={servicesManager} servicesManager={servicesManager}
viewportComponents={viewportComponents} viewportComponents={viewportComponents}
/> />

View File

@ -15,7 +15,6 @@ export default function ModeRoute({
extensionManager, extensionManager,
servicesManager, servicesManager,
}) { }) {
console.warn('ModeRoute rerendering');
const { routes, extensions, sopClassHandlers } = mode; const { routes, extensions, sopClassHandlers } = mode;
const dataSources = extensionManager.getDataSources(dataSourceName); const dataSources = extensionManager.getDataSources(dataSourceName);
// TODO: For now assume one unique datasource. // TODO: For now assume one unique datasource.
@ -54,10 +53,7 @@ export default function ModeRoute({
const CombinedContextProvider = ({ children }) => const CombinedContextProvider = ({ children }) =>
Compose({ components: contextModuleProviders, children }); Compose({ components: contextModuleProviders, children });
debugger;
function ViewportGridWithDataSource(props) { function ViewportGridWithDataSource(props) {
debugger;
return ViewportGrid({ ...props, dataSource }); return ViewportGrid({ ...props, dataSource });
} }
@ -87,15 +83,6 @@ export default function ModeRoute({
return ( return (
<React.Fragment> <React.Fragment>
{/*<ToolbarLayoutProvider>*/} {/*<ToolbarLayoutProvider>*/}
{/*
<DisplaySetCreator
location={location}
mode={mode}
dataSourceName={dataSourceName}
extensionManager={extensionManager}
DisplaySetService={DisplaySetService}
/>
*/}
<CombinedContextProvider> <CombinedContextProvider>
{/* TODO: extensionManager is already provided to the extension module. {/* TODO: extensionManager is already provided to the extension module.
* Use it from there instead of passing as a prop here. * Use it from there instead of passing as a prop here.