-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List of nodes on the screen #544
Comments
@hyeonbeomsong which mode (2D, 3D, VR, AR) are you using? Each of them would have a different way of approaching this. |
@vasturiano I am using react-force-graph-2d. |
I also worked on a project using the react-force-graph-3d library. The results have been developed on the main website of Seoul National University Library, which is the best in Korea. https://likesnu.snu.ac.kr/ It was so difficult and hard to develop this. Visualization Library Used
|
The likesnu webpage serves to obtain information on content (lectures, books, papers) on a specific topic (topic) and provide information to students and users of the Seoul National University library. Please do the page language conversion ENG and check it out. Topics page bottom There is also a visualization. If you choose a specific book on the Books page Similarly, the Papers page also has a visualization. Right now, I'm working on visualizing the Courses page as well. |
@hyeonbeomsong regarding your original question, you can convert any node's coordinates to screen coordinates (using Here's a generic example just for illustration: // assuming access to the graphRef, and the canvas width, height
const isNodeOnScreen = node => {
const { x, y } = graphRef.current.graph2ScreenCoords(node.x, node.y);
return x >= 0 && x <= width && y >= 0 && y <= height;
} |
Is there a way to know the list of nodes that exist within the screen of the current graph instance?
For example, you want to remove the labels of invisible nodes according to zoom in/out.
Ultimately, when hundreds and thousands of nodes are rendered, it is difficult to identify node labels when the entire node is initially seen as zoomToFit().
Therefore, we want to show labels for specific nodes based on the property value of the node and the scale value of zoom in/out.
ex) When magnified the most, all the labels of the nodes visible on the screen are visible
ex) In the midpoint enlargement section, certain nodes (depending on the numerical value of node properties) among the nodes visible on the screen
The text was updated successfully, but these errors were encountered: