Skip to content

Commit

Permalink
Default pen color is black (#000000) when style is filled
Browse files Browse the repository at this point in the history
fixup! Default pen color is transparent when style is filled
  • Loading branch information
Magnus Jacobsson authored and Magnus Jacobsson committed Apr 28, 2018
1 parent f6aa61a commit 6698b73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
build/
node_modules
npm-debug.log
*~
3 changes: 3 additions & 0 deletions src/drawNode.js
Expand Up @@ -37,6 +37,9 @@ function completeAttributes(attributes, defaultAttributes=defaultNodeAttributes)

export function drawNode(x, y, width, height, shape='ellipse', nodeId="", attributes, options={}) {
attributes = attributes || {};
if (attributes.style == 'filled' && !attributes.color) {
attributes.color = '#000000';
}
if (shape == 'point' && !attributes.fillcolor) {
attributes.fillcolor = '#000000';
}
Expand Down

0 comments on commit 6698b73

Please sign in to comment.