Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

fix parent node width

AykutSaracf3b97d854fee
diff --git a/src/containers/Modals/ImportModal/index.tsx b/src/containers/Modals/ImportModal/index.tsx
index f4d9c8a2..02c9da28 100644
--- a/src/containers/Modals/ImportModal/index.tsx
+++ b/src/containers/Modals/ImportModal/index.tsx
@@ -86,6 +86,7 @@ export const ImportModal: React.FC<ModalProps> = ({ visible, setVisible }) => {
onChange={e => setURL(e.target.value)}
type="url"
placeholder="URL of JSON to fetch"
+ autoFocus
/>
<StyledUploadWrapper>
<input
diff --git a/src/utils/core/calculateNodeSize.ts b/src/utils/core/calculateNodeSize.ts
index 58c82098..3b4d7b06 100644
--- a/src/utils/core/calculateNodeSize.ts
+++ b/src/utils/core/calculateNodeSize.ts
@@ -29,7 +29,7 @@ export const calculateNodeSize = (text: string | [string, string][], isParent =
const getWidth = () => {
if (text.length === 0) return 35;
if (Array.isArray(text) && !text.length) return 40;
- if (!isFolded) return 35 + longestLine * 7.8 + (isParent ? 60 : 0);
+ if (!isFolded) return 35 + longestLine * 7.8 + (isParent ? 80 : 0);
if (isParent && isFolded) return 170;
return 200;
};