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

Tag command & Horizontal labels rotation

Compare
Choose a tag to compare
@nicoespeon nicoespeon released this 06 Jan 08:38
· 992 commits to master since this release

#134 -> Thanks to @cgddrd, labels properly rotate in horizontal mode. You can provide a labelRotation configuration to your template too:

var graphConfig = new GitGraph.Template({
    branch: {
        color: "#000000",
        mergeStyle: "straight",
        labelRotation: 0 // -> can be configured
    },
});

var gitGraph = new GitGraph({
  template: graphConfig,
  mode: "extended",
  orientation: "horizontal"
});

#75 -> Now you can tag current HEAD with .tag( "my-tag" ). You can still pass tag options to the method:

var gitGraph = new GitGraph({ template: "metro" });

gitGraph
  .commit("Tag this commit")
  .tag("my-tag");

// alternatively
gitGraph
  .commit("Tag this commit")
  .tag({
    tag: "my-tag",
    tagColor: "green",
    tagFont: "normal 14pt Arial",
    displayTagBox: false
  });

#121 -> Fix rendering when parent branch has no commit.