fix: layout calc
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.TreeDiagramsContainer {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.MainLoader {
|
||||
|
||||
@@ -24,6 +24,7 @@ const TreeDiagramsContainer = ({ namespacesList, activeNamespace }) => {
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: use ref for TreeDiagram container (on mount set it to store)
|
||||
return (
|
||||
<div className={'TreeDiagramsContainer'}>
|
||||
{namespacesList.map(namespace => (
|
||||
|
||||
@@ -69,6 +69,8 @@ export const getTreeLayout = (
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// TODO: calc properly, not 5000
|
||||
// impossible to do in one loop
|
||||
const LARGE_WIDTH_CC = 5000;
|
||||
const widthSpace =
|
||||
node.data.type !== DIR_NODE_TYPE && node.data.type !== FILE_NODE_TYPE
|
||||
|
||||
Reference in New Issue
Block a user