[BUGFIX] Highlighting in forcegraph
This commit is contained in:
		
							parent
							
								
									519f37cd14
								
							
						
					
					
						commit
						a0378348b5
					
				| @ -32,7 +32,7 @@ define(['helper'], function (helper) { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   function drawHighlightNode(d) { |   function drawHighlightNode(d) { | ||||||
|     if (highlight && highlight.type === 'node' && d.o === highlight.o) { |     if (highlight && highlight.type === 'node' && d.o.node_id === highlight.o.node_id) { | ||||||
|       ctx.arc(d.x, d.y, NODE_RADIUS * 1.5, 0, 2 * Math.PI); |       ctx.arc(d.x, d.y, NODE_RADIUS * 1.5, 0, 2 * Math.PI); | ||||||
|       ctx.fillStyle = highlightColor; |       ctx.fillStyle = highlightColor; | ||||||
|       ctx.fill(); |       ctx.fill(); | ||||||
| @ -41,7 +41,7 @@ define(['helper'], function (helper) { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   function drawHighlightLink(d, to) { |   function drawHighlightLink(d, to) { | ||||||
|     if (highlight && highlight.type === 'link' && d.o === highlight.o) { |     if (highlight && highlight.type === 'link' && d.o.id === highlight.o.id) { | ||||||
|       ctx.lineTo(to[0], to[1]); |       ctx.lineTo(to[0], to[1]); | ||||||
|       ctx.strokeStyle = highlightColor; |       ctx.strokeStyle = highlightColor; | ||||||
|       ctx.lineWidth = LINE_RADIUS * 2; |       ctx.lineWidth = LINE_RADIUS * 2; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user