gitgraph.js icon indicating copy to clipboard operation
gitgraph.js copied to clipboard

Orientation.VerticalReverse renders incorrectly

Open briangordon opened this issue 5 years ago • 6 comments

In the reverse vertical orientation, the dark blue release branch lies over the develop branch in the following screenshot:

screenshot

However, in the standard orientation, the dark blue release branch is correctly routed so that it doesn't overlap the develop branch:

screenshot-1

This is the code I'm using:

      {(gitgraph) => {
        const develop = gitgraph.branch("develop").commit();
        const feature1 = gitgraph.branch("feature1").commit();
        develop.merge(feature1);
        const fix = gitgraph.branch("feature3");
        const release = gitgraph.branch("release1");
        const feature2 = gitgraph.branch("feature2");
        feature2.commit();
        develop.merge(feature2);
        fix.commit();
        release.merge(fix);
        develop.merge(fix);
      }}

briangordon avatar Apr 16 '19 18:04 briangordon

Thanks for the detailed feedback, we'll look into it 👍

nicoespeon avatar Apr 16 '19 21:04 nicoespeon

Hi everyone! I have the same issue! Do we have any news on this? In my example: reversed image natural image

Just to add more detail, I saw that if we add a new commit or a merge after the last one on the new branch, the graph draws correctly even on the vertical-reversed orientation. The below example shows that. image

lhassis avatar Nov 30 '20 13:11 lhassis

Hi everyone! I managed to solve the problem on my example by changing the first if on the smoothBranchesPaths function to check if length is less or equal than 2. The result is show in the image below image

So far, it was enough to my application but I'm not sure if this is the deffinitive solution, since I don't know the component code details well enough.

lhassis avatar Dec 01 '20 14:12 lhassis

Well that fixes the overlap but the paths aren't really rendered the same. I'm running into the same issue here. Will have to work with the non reversed oriented graphs for now until this gets fixed.

sandercox avatar Oct 01 '21 14:10 sandercox

Thanks for the detailed feedback, we'll look into it 👍

Any solution to this problem?

gsGupta11 avatar Feb 15 '22 11:02 gsGupta11

Not that I'm aware of 🙂

To be clear: I'm not working/maintaining this lib anymore. The issue is still open to be solved with the provided details.

nicoespeon avatar Feb 19 '22 17:02 nicoespeon