yo16 / sql_parse_client_202407

using Vite
MIT License
0 stars 0 forks source link

Query1の後、2を実行すると、表示が崩れる #5

Closed yo16 closed 3 months ago

yo16 commented 3 months ago

Query1のあと2を実行すると、表示が崩れ、エラーが出る image

Warning: Received NaN for the `width` attribute. If this is expected, cast the value to a string.
    at rect
    at ClauseFromsBox (http://localhost:5173/src/UIComponents/CanvasComponents/ClauseFromsBox.tsx?t=1722582140873:23:3)
    at g
    at TableStructQuerySelectBox (http://localhost:5173/src/UIComponents/CanvasComponents/TableStructQuerySelectBox.tsx?t=1722582140873:24:3)
    at TableStructQueryBox (http://localhost:5173/src/UIComponents/CanvasComponents/TableStructQueryBox.tsx?t=1722582140873:20:3)
    at g
    at svg
    at div
    at div
    at TransformComponent (http://localhost:5173/node_modules/.vite/deps/react-zoom-pan-pinch.js?v=ae7801fa:1841:21)
    at http://localhost:5173/node_modules/.vite/deps/react-zoom-pan-pinch.js?v=ae7801fa:1617:43
    at div
    at LineageCanvas (http://localhost:5173/src/UIComponents/LineageCanvas.tsx?t=1722582140873:25:26)
    at div
    at Contents (http://localhost:5173/src/UIComponents/Contents.tsx?t=1722582140873:26:33)
    at div
    at App
yo16 commented 3 months ago

svgのwidthがNaNになっていて、強制的に広げると下記 image

yo16 commented 3 months ago

width、heightは親から指定するのではなく、子自身で決定すべき

yo16 commented 3 months ago

6 の実装をしたら、この問題は解決していた。

yo16 commented 3 months ago

image