-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Added new Hexagon shape in the Network #3420
Conversation
From the Travis build:
Please fix all error messages from |
lib/network/shapes.js
Outdated
*/ | ||
CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) { | ||
this.beginPath(); | ||
var sides = 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
lib/network/shapes.js
Outdated
for (var i = 1; i < sides; i++) { | ||
this.lineTo(x+r*Math.cos(a*i),y+r*Math.sin(a*i)); | ||
} | ||
this.closePath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Some trivial code stuff.
Can you add In file
Please add 'hexagon' to this list - anywhere you see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect
Travis checks are failing, but this is not your fault. It's a known issue (and it's driving me crazy). If you want to do something about this, please add the following: In file after(function() {
try {
this.jsdom_global();
} catch(e) {
if (e.message() === 'window is undefined') {
console.warning("'" + e.message() + "' happened again");
} else {
throw e;
}
}
}); This is totally unrelated to your changes. But it would be a good test to see if it helps Travis. |
😞 Didn't help. But thanks for doing it anyway. Your PR is good, despite the failing test. Nothing to do with the PR. |
lgtm +1 |
How much time will it take to merge this PR? |
Not too much. Someone else will do it and it depends on his availability. I think it will happen this weekend. |
* added hexagon shape to the node. * Updated function for hexagon shape.js * Modifid the shape login for hexagon * Remove this.translate from the Shape.js for hexagon * updated hexagon draw logic * Fixed code review comments and update the branch * Updated changes in test.js
Fixed #3418 and added Hexagon shape for nodes.