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

Releases: nicoespeon/gitgraph.js

Dashed-style commits

21 Apr 19:09
Compare
Choose a tag to compare

See #139.

Now you can define a line dash to your commits and branches:

var gitGraph = new GitGraph();

var master = gitGraph.branch({
  name: "master",
  color: "#F00",
  lineDash: [5]
});

master.commit({
  lineDash: [3, 2],
  dotStrokeWidth: 5,
  message: "This commit stroke is dashed"
});

The lineDash option expects a list of segments to pass to CanvasRenderingContext2D.setLineDash(). These segments are numbers that specifies distances to alternately draw a line and a gap.

Finally, you can specify a lineDash value to the branch and commit options of your custom template.

Fix commit details position

19 Apr 07:01
Compare
Choose a tag to compare

See #145.

Also includes:

  • add types definition to package.json
  • fix incorrect font height in labels and tags when graph is in a floating container (#155)

Add TypeScript Definitions

03 Apr 09:43
Compare
Choose a tag to compare

GitGraph's TypeScript definitions are produced in a gitgraph.d.ts file, along the build.

See #150.

Configurable tooltips container

12 Mar 21:04
Compare
Choose a tag to compare

You can specify a custom HTML element to contain tooltips displayed in compact mode:

var gitGraph = new GitGraph({
  template: "metro",
  tooltipContainer: document.querySelector("#tooltips"),
  mode: "compact"
});

If you don't provide a tooltipContainer, it will default to document.body.

See #147.

Fix horizontal tags alignment

10 Jan 07:10
Compare
Choose a tag to compare

Display details in vertical-reverse mode

09 Jan 23:51
Compare
Choose a tag to compare

Fix few quirks in complex graphs drawing

09 Jan 22:33
Compare
Choose a tag to compare

Little fixes to around edge cases for graph drawing (see #120).

Tag command & Horizontal labels rotation

06 Jan 08:38
Compare
Choose a tag to compare

#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.

Fix orphaned arrow head scenarios

17 Dec 09:16
Compare
Choose a tag to compare

Template blackarrow used to generate orphaned arrow head in some scenario (see #117).
Those are fixed now.

Allow to configure commit default options at branch level

16 Dec 17:36
Compare
Choose a tag to compare

Now you can do things like:

var dev = master.branch({
  name: "dev",
  color: "cyan",
  commitDefaultOptions: { color: "cyan" }
});

This will make your commits be cyan by default on dev branch.
It works for others commit options too.