Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

Gitgraph import JSON merges branches to the right #276

Closed
Andrey-Pavlov opened this issue Apr 15, 2019 · 3 comments
Closed

Gitgraph import JSON merges branches to the right #276

Andrey-Pavlov opened this issue Apr 15, 2019 · 3 comments
Labels
📦 Archived Open issues when project was archived 🐛 Bug Unexpected behavior to be fixed

Comments

@Andrey-Pavlov
Copy link

Andrey-Pavlov commented Apr 15, 2019

Describe the bug
GitGraph Import JSON doesn't render dag correctly as any GIT visualizer. It merge branches to the right side.

To Reproduce
Get any complicated git repository, for example, "gitgraph.js". Generate JSON with GitToJson npm module.

    const graphContainer = this.gitGraphCanvas.nativeElement;
    const gitGraph = createGitgraph(graphContainer);
    gitGraph.import(commits);

Expected behavior
"Master" branch must stay on the left / not growing to the right.
Repo with screenshots: ScreensRepo

Screenshots
MergeRight1
MergeRight2

Full GitGraphJs dag

My1

My repo:

More Screens

My1
My2

@Andrey-Pavlov Andrey-Pavlov added the 🐛 Bug Unexpected behavior to be fixed label Apr 15, 2019
@IsaacHub
Copy link

I couldn't find GitToJson in npm, there is no such package. Can you post a link to the npm module.

@Andrey-Pavlov
Copy link
Author

@IsaacHub In this issue (#38) was mentioned: https://github.com/fabien0102/git2json (#38 (comment))

I also used it to render GIT dag from JSON

@JUSTDIWAKAR
Copy link

Hi @Andrey-Pavlov,

It's been too late but to anyone else facing the same problem, you can fix ur problem by applying some CSS to rotate that gitgraph element.
like,
::ng-deep svg {
transform: scaleX(-1) rotate(90deg);
}

@nicoespeon nicoespeon added the 📦 Archived Open issues when project was archived label Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📦 Archived Open issues when project was archived 🐛 Bug Unexpected behavior to be fixed
Projects
None yet
Development

No branches or pull requests

4 participants