@@ -338,6 +338,7 @@ const TreeVisualizer: React.FC<TreeVisualizerProps> = ({ |
| 338 | }; | 338 | }; |
| 339 | | 339 | |
| 340 | // Create quirky curved links | 340 | // Create quirky curved links |
| | 341 | + // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 341 | const linkGenerator = d3.linkVertical<any, any>() | 342 | const linkGenerator = d3.linkVertical<any, any>() |
| 342 | .x(d => d.x) | 343 | .x(d => d.x) |
| 343 | .y(d => d.y) | 344 | .y(d => d.y) |
@@ -493,16 +494,19 @@ const TreeVisualizer: React.FC<TreeVisualizerProps> = ({ |
| 493 | | 494 | |
| 494 | // Add interactivity | 495 | // Add interactivity |
| 495 | node.selectAll('.node-shape') | 496 | node.selectAll('.node-shape') |
| | 497 | + // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 496 | .style('cursor', function(this: any) { | 498 | .style('cursor', function(this: any) { |
| 497 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; | 499 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; |
| 498 | if (d.data.path === playerLocation) return 'default'; | 500 | if (d.data.path === playerLocation) return 'default'; |
| 499 | return isAdjacentNode(d.data.path, playerLocation) ? 'pointer' : 'not-allowed'; | 501 | return isAdjacentNode(d.data.path, playerLocation) ? 'pointer' : 'not-allowed'; |
| 500 | }) | 502 | }) |
| | 503 | + // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 501 | .style('opacity', function(this: any) { | 504 | .style('opacity', function(this: any) { |
| 502 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; | 505 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; |
| 503 | if (d.data.path === playerLocation) return 1; | 506 | if (d.data.path === playerLocation) return 1; |
| 504 | return isAdjacentNode(d.data.path, playerLocation) ? 1 : 0.5; | 507 | return isAdjacentNode(d.data.path, playerLocation) ? 1 : 0.5; |
| 505 | }) | 508 | }) |
| | 509 | + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars |
| 506 | .on('mouseover', function(this: any, event: MouseEvent) { | 510 | .on('mouseover', function(this: any, event: MouseEvent) { |
| 507 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; | 511 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; |
| 508 | if (d.data.path !== playerLocation && isAdjacentNode(d.data.path, playerLocation)) { | 512 | if (d.data.path !== playerLocation && isAdjacentNode(d.data.path, playerLocation)) { |
@@ -516,6 +520,7 @@ const TreeVisualizer: React.FC<TreeVisualizerProps> = ({ |
| 516 | .style('filter', 'url(#glow) drop-shadow(0 0 8px rgba(0,0,0,0.4))'); | 520 | .style('filter', 'url(#glow) drop-shadow(0 0 8px rgba(0,0,0,0.4))'); |
| 517 | } | 521 | } |
| 518 | }) | 522 | }) |
| | 523 | + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars |
| 519 | .on('mouseout', function(this: any, event: MouseEvent) { | 524 | .on('mouseout', function(this: any, event: MouseEvent) { |
| 520 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; | 525 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; |
| 521 | d3.select(this) | 526 | d3.select(this) |
@@ -529,6 +534,7 @@ const TreeVisualizer: React.FC<TreeVisualizerProps> = ({ |
| 529 | }) | 534 | }) |
| 530 | .style('filter', d.data.path === playerLocation ? 'url(#glow)' : 'url(#drop-shadow)'); | 535 | .style('filter', d.data.path === playerLocation ? 'url(#glow)' : 'url(#drop-shadow)'); |
| 531 | }) | 536 | }) |
| | 537 | + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars |
| 532 | .on('click', function(this: any, event: MouseEvent) { | 538 | .on('click', function(this: any, event: MouseEvent) { |
| 533 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; | 539 | const d = d3.select(this.parentNode).datum() as d3.HierarchyPointNode<TreeNode>; |
| 534 | if (onNodeClick && d.data.path !== playerLocation && isAdjacentNode(d.data.path, playerLocation)) { | 540 | if (onNodeClick && d.data.path !== playerLocation && isAdjacentNode(d.data.path, playerLocation)) { |