[TASK] Remove shadow in forcegraph
This commit is contained in:
parent
df9facb3f6
commit
24b5784131
@ -285,18 +285,6 @@ define(['d3', 'helper'], function (d3, helper) {
|
|||||||
nctx.moveTo(radius, 0);
|
nctx.moveTo(radius, 0);
|
||||||
nctx.arc(0, 0, radius, 0, 2 * Math.PI);
|
nctx.arc(0, 0, radius, 0, 2 * Math.PI);
|
||||||
|
|
||||||
nctx.strokeStyle = 'rgba(255, 0, 0, 1)';
|
|
||||||
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;
|
|
||||||
nctx.shadowOffsetY = node.height * 1.5 + 3;
|
|
||||||
nctx.shadowBlur = 12;
|
|
||||||
nctx.shadowColor = 'rgba(0, 0, 0, 0.23)';
|
|
||||||
nctx.stroke();
|
|
||||||
|
|
||||||
nctx.restore();
|
nctx.restore();
|
||||||
nctx.translate(node.width / 2 / scale / r, node.height / 2 / scale / r);
|
nctx.translate(node.width / 2 / scale / r, node.height / 2 / scale / r);
|
||||||
|
|
||||||
@ -404,10 +392,6 @@ define(['d3', 'helper'], function (d3, helper) {
|
|||||||
// -- draw node highlights --
|
// -- draw node highlights --
|
||||||
if (highlightedNodes.length) {
|
if (highlightedNodes.length) {
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.shadowColor = 'rgba(255, 255, 255, 1.0)';
|
|
||||||
ctx.shadowBlur = 10 * nodeRadius;
|
|
||||||
ctx.shadowOffsetX = 0;
|
|
||||||
ctx.shadowOffsetY = 0;
|
|
||||||
ctx.globalCompositeOperation = 'lighten';
|
ctx.globalCompositeOperation = 'lighten';
|
||||||
ctx.fillStyle = highlightColor;
|
ctx.fillStyle = highlightColor;
|
||||||
|
|
||||||
@ -425,10 +409,6 @@ define(['d3', 'helper'], function (d3, helper) {
|
|||||||
if (highlightedLinks.length) {
|
if (highlightedLinks.length) {
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.lineWidth = 2 * 5 * nodeRadius;
|
ctx.lineWidth = 2 * 5 * nodeRadius;
|
||||||
ctx.shadowColor = 'rgba(255, 255, 255, 1.0)';
|
|
||||||
ctx.shadowBlur = 10 * nodeRadius;
|
|
||||||
ctx.shadowOffsetX = 0;
|
|
||||||
ctx.shadowOffsetY = 0;
|
|
||||||
ctx.globalCompositeOperation = 'lighten';
|
ctx.globalCompositeOperation = 'lighten';
|
||||||
ctx.strokeStyle = highlightColor;
|
ctx.strokeStyle = highlightColor;
|
||||||
ctx.lineCap = 'round';
|
ctx.lineCap = 'round';
|
||||||
@ -684,8 +664,6 @@ define(['d3', 'helper'], function (d3, helper) {
|
|||||||
bctx.textBaseline = 'middle';
|
bctx.textBaseline = 'middle';
|
||||||
bctx.textAlign = 'center';
|
bctx.textAlign = 'center';
|
||||||
bctx.fillStyle = 'rgba(242, 227, 198, 1.0)';
|
bctx.fillStyle = 'rgba(242, 227, 198, 1.0)';
|
||||||
bctx.shadowColor = 'rgba(0, 0, 0, 1)';
|
|
||||||
bctx.shadowBlur = 5;
|
|
||||||
bctx.fillText(name, buffer.width / (2 * scale), buffer.height / (2 * scale));
|
bctx.fillText(name, buffer.width / (2 * scale), buffer.height / (2 * scale));
|
||||||
|
|
||||||
d.label = buffer;
|
d.label = buffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user