[TASK] CGL - Optimize returns and unnecessary math
This commit is contained in:
parent
c7b58d5743
commit
c9458ffcae
3 changed files with 5 additions and 11 deletions
|
@ -273,8 +273,7 @@ define(["d3"], function (d3) {
|
|||
|
||||
function drawNode(color, radius, scale, r) {
|
||||
var node = document.createElement("canvas");
|
||||
node.width = scale * radius * 8 * r;
|
||||
node.height = node.width;
|
||||
node.height = node.width = scale * radius * 8 * r;
|
||||
|
||||
var nctx = node.getContext("2d");
|
||||
nctx.scale(scale * r, scale * r);
|
||||
|
@ -288,12 +287,12 @@ define(["d3"], function (d3) {
|
|||
nctx.arc(0, 0, radius, 0, 2 * Math.PI);
|
||||
|
||||
nctx.strokeStyle = "rgba(255, 0, 0, 1)";
|
||||
nctx.shadowOffsetX = node.width * 1.5 + 0;
|
||||
nctx.shadowOffsetX = node.width * 1.5;
|
||||
nctx.shadowOffsetY = node.height * 1.5 + 3;
|
||||
nctx.shadowBlur = 12;
|
||||
nctx.shadowColor = "rgba(0, 0, 0, 0.16)";
|
||||
nctx.stroke();
|
||||
nctx.shadowOffsetX = node.width * 1.5 + 0;
|
||||
nctx.shadowOffsetX = node.width * 1.5;
|
||||
nctx.shadowOffsetY = node.height * 1.5 + 3;
|
||||
nctx.shadowBlur = 12;
|
||||
nctx.shadowColor = "rgba(0, 0, 0, 0.23)";
|
||||
|
@ -562,7 +561,6 @@ define(["d3"], function (d3) {
|
|||
|
||||
if (links.length > 0) {
|
||||
router.link(links[0].o)();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue