Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

GRAPH 1: Layout improvements #116

Merged
merged 15 commits into from
Apr 7, 2023
Merged

Conversation

arniebradfo
Copy link
Collaborator

@arniebradfo arniebradfo commented Mar 31, 2023

This is part 1 of a series of stacked PRs meant to isolate issues if they arise. #117

Description

Improve the graph layout so nodes are more spaced apart and less likely to overlap

  • improve the d3.force() compatible forceClampToRadius by making the forces softer. This was the primary cause of the overlap issue.
  • tweak other forces spacing
  • tweak the radius calculations so they cascade on each other
  • split HierarchicalGraphRenderer extended classes' constructors into more defined methods: initializeForces and initializeSelection
  • There are also now methods to toggle force direction: GraphHandler.useGraphForces() and GraphHandler.useSimpleForces(). The simple forces only include collision detection so a user can create a very precise layout.
    • These have not been implemented in the UI, but could be in the future. Maybe in a 'Graph Settings' panel.

Testing

  • look at several different graph layouts. Does anything overlap?
  • does the typical graph interaction still work?
  • hiding and showing content

Screenshots

No screenshots since the graph 'looks' the same. It just has less error edge cases and is more fluid in interaction.

@ccarpenter28
Copy link
Contributor

ccarpenter28 commented Apr 4, 2023

When an item (beacon, host, etc.) is hidden/shown, the graph jumps around on the screen and does not stay centered. I checked the develop branch and also noticed it happening there, although it is more severe in that branch -- the graph moves completely off-screen in develop. Since the behavior isn't quite the same, not sure if you want to handle the graph movement in this branch or separately.

@GoldingAustin GoldingAustin merged commit 98e64a2 into develop Apr 7, 2023
@GoldingAustin GoldingAustin deleted the graph-layout-improvements branch April 7, 2023 19:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants