ソースを参照

fix parent node width

AykutSarac 2 年 前
コミット
f3b97d854f

+ 1 - 0
src/containers/Modals/ImportModal/index.tsx

@@ -86,6 +86,7 @@ export const ImportModal: React.FC<ModalProps> = ({ visible, setVisible }) => {
           onChange={e => setURL(e.target.value)}
           onChange={e => setURL(e.target.value)}
           type="url"
           type="url"
           placeholder="URL of JSON to fetch"
           placeholder="URL of JSON to fetch"
+          autoFocus
         />
         />
         <StyledUploadWrapper>
         <StyledUploadWrapper>
           <input
           <input

+ 1 - 1
src/utils/core/calculateNodeSize.ts

@@ -29,7 +29,7 @@ export const calculateNodeSize = (text: string | [string, string][], isParent =
   const getWidth = () => {
   const getWidth = () => {
     if (text.length === 0) return 35;
     if (text.length === 0) return 35;
     if (Array.isArray(text) && !text.length) return 40;
     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;
     if (isParent && isFolded) return 170;
     return 200;
     return 200;
   };
   };