Skip to content

Commit

Permalink
compile
Browse files Browse the repository at this point in the history
  • Loading branch information
strathausen committed Mar 31, 2018
1 parent 526bf8e commit be81b76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/dracula.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions lib/dracula.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var Dracula = function () {
}

/**
* Creator for the new haters :)
* `create` for the `new` haters :)
*
* @returns {Dracula} a new graph instance
*/
Expand Down Expand Up @@ -82,10 +82,11 @@ var Dracula = function () {
}, {
key: 'addEdge',
value: function addEdge(sourceNode, targetNode) {
var style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

var source = this.addNode(sourceNode);
var target = this.addNode(targetNode);
var style = opts.style || opts;
var edge = { style: style, source: source, target: target };
this.edges.push(edge);
source.edges.push(edge);
Expand Down

0 comments on commit be81b76

Please sign in to comment.