Skip to content
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

Multi directional arrows have heads of different sizes #4195

Closed
Zannick opened this issue Mar 7, 2023 · 2 comments · Fixed by #4286
Closed

Multi directional arrows have heads of different sizes #4195

Zannick opened this issue Mar 7, 2023 · 2 comments · Fixed by #4286
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@Zannick
Copy link

Zannick commented Mar 7, 2023

Description

In a simple flowchart with multi-directional (bidirectional) arrows, the left arrow head is about 2x the width and height each of the right head.

Steps to reproduce

Create a graph or flowchart with a double-ended arrow:

graph LR
C <--> F[fa:fa-car Car]

like so

graph LR
C <--> F[fa:fa-car Car]
Loading

but on the live demo or using the cli

Screenshots

renders like this for me: Screenshot 2023-03-06 204954

Using the linux CLI on my real graph:
Screenshot from 2023-03-06 20-54-26

Code Sample

graph LR
A <--> B

Setup

CLI:
mmdc version: 10.0.0

Live demo:
Mermaid version: 10.0.0
Browser and Version: Chrome Version 110.0.5481.178 (Official Build) (64-bit)

Additional Context

generated svg taken from the live demo. Notice the viewBoxes are different sizes. Changing the pointEnd viewBox in developer tools to 0 0 10 10 results in an arrow of the same size as the large left arrow. Similarly, changing the pointStart to 0 0 12 20 results in the arrow shrinking to the same size as the right arrow.

<marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="10" viewBox="0 0 12 20" class="marker flowchart" id="flowchart-pointEnd"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"></path></marker>
<marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="0" viewBox="0 0 10 10" class="marker flowchart" id="flowchart-pointStart"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"></path></marker>
@Zannick Zannick added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Mar 7, 2023
@bhearsum
Copy link

I'm hitting this as well. The problem appears to worse the deeper the graph is. Here's an example on the live editor:
image

(And when you go deep enough, one side of the arrowheads end up becoming almost entirely invisible.)

@nekr0z
Copy link

nekr0z commented Mar 27, 2023

Still an issue in 10.0.2: live editor and Mermaid documentation website, Firefox.

legonigel added a commit to legonigel/mermaid that referenced this issue Apr 10, 2023
In mermaid-js#3938, it appears that the marker sizes for pointEnd was
unintentionally changed. This reverts the change in marker size.

It is also possible that the intention was to change the viewBox size
for both start and end, but I doubt this since it makes the arrows
significantly smaller than other markers.
sidharthv96 added a commit that referenced this issue Apr 13, 2023
Fix #4195 start and end arrow have different sizes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants