-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example Flowchart is cut in display (Chrome). #368
Comments
I got the same issue. |
Nothing wrong. I will take a look at this. It can be fixed by adding the code below to the callback. But that is not the real fix but more like band aid:
|
I had the same problem. It's really caused by having the same id for the |
I still got the same issue. |
@tylerlong version 8.0.0-rc.6 fix this bug,great help!! |
@tylerlong graph LR 提交申请 熊大 class sid-B3655226-6C29-4D00-B685-3D5C734DC7E1 node-executed; sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A[" 负责人审批 强子 class sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A node-executed; sid-E27C0367-E6D6-497F-9736-3CDC21FDE221[" DBA审批 强子 class sid-E27C0367-E6D6-497F-9736-3CDC21FDE221 node-executed; sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD[" SA审批 阿美 class sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD node-executed; sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7[" 主管审批 光头强 class sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7 node-executed; sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89[" DBA确认 强子 class sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89 node-executed; sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937[" SA确认 阿美 class sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937 node-executed; sid-4FC27B48-A6F9-460A-A675-021F5854FE22[" 结束 class sid-4FC27B48-A6F9-460A-A675-021F5854FE22 node-executed; sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E[" SA执行1 强子 class sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E node-executed; sid-6C2120F3-D940-4958-A067-0903DCE879C4[" SA执行2 强子 class sid-6C2120F3-D940-4958-A067-0903DCE879C4 node-executed; sid-9180E2A0-5C4B-435F-B42F-0D152470A338[" DBA执行1 强子 class sid-9180E2A0-5C4B-435F-B42F-0D152470A338 node-executed; sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD[" DBA执行3 强子 class sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD node-executed; sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756[" DBA执行2 强子 class sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756 node-executed; sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93[" DBA执行4 强子 class sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93 node-executed; sid-1897B30A-9C5C-4D5B-B80B-76A038785070[" 负责人确认 梁静茹 class sid-1897B30A-9C5C-4D5B-B80B-76A038785070 node-executed; sid-B3655226-6C29-4D00-B685-3D5C734DC7E1-->sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7; sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A-->sid-1897B30A-9C5C-4D5B-B80B-76A038785070; sid-E27C0367-E6D6-497F-9736-3CDC21FDE221-->sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89; sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD-->sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937; sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E-->sid-6C2120F3-D940-4958-A067-0903DCE879C4; sid-9180E2A0-5C4B-435F-B42F-0D152470A338-->sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756; sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD-->sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93; sid-6C2120F3-D940-4958-A067-0903DCE879C4-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A; sid-1897B30A-9C5C-4D5B-B80B-76A038785070-->sid-4FC27B48-A6F9-460A-A675-021F5854FE22; sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937-->sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E; sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89-->sid-9180E2A0-5C4B-435F-B42F-0D152470A338; sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89-->sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD; sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A; sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A; sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD; sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-E27C0367-E6D6-497F-9736-3CDC21FDE221; sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937-->sid-6C2120F3-D940-4958-A067-0903DCE879C4; sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A; sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-4FC27B48-A6F9-460A-A675-021F5854FE22; |
Hi. "height" does not seem to have any effect. Using a simpler test it seems to break once you exceed some proportion: test with simple labels. However, other arrangements seem to fit: 10 level test with short labels and the same graph with longer labels. @z827101859 's example seems to break sooner: complex example. |
It's an issue from upstream project dagre. So the layout generated by dagre sometimes goes out of the view and got cut off. I tried to fix it by making the svg larger and transform the content so that no content is being cut. It seems that it's not the ultimate solution because you don't know how much larger should the svg be in order to fix all the cut-off issues. I have a idea to fix it elegantly. I need some time though. |
@tylerlong 加油!你可以的! |
Hi, The view is clipping the image. However, changing the first transform operation's arguments from (32,32) to (32,55) seems to always work. How are those values calculated? |
Here comes the "ultimate solution": 44ff608 This should fix all the cut-off issues. And the content of the svg should be placed right in the middle with exact padding of 8px. Please test the live editor and report issues to me(if there are any). :) |
Hi, No clipping! Max-width does not seem to be respected? |
I think it is a feature instead of a bug. Where is max width being set? nowhere. If you set max width to 100%, it will scale the svg which makes the text too tiny to read. And if 100% width is default, small diagrams will have lots of white space which is not ideal. I am open to ideas to improve this part. Update: let's reopen this issue. |
fixed |
…yarn/develop/typescript-eslint/parser-4.31.1 chore(deps-dev): bump @typescript-eslint/parser from 4.31.0 to 4.31.1
If I run the following code in chrome the area of "Round Rect" is only half visible and in Firefox the text is also not shown. The graph is cut there. What did I wrong?
The text was updated successfully, but these errors were encountered: