Fix auto fit disabled afther zoom in or out manually

- Enhanced FocusOnNode component logic
- Added reset to default view when no node
- Updated mouse event handling for custom BBox
- Added sigmaRef for future use
- Triggered camera reset after graph updates
This commit is contained in:
yangdx
2025-03-13 00:34:20 +08:00
parent 727b137506
commit d06d3a20b1
3 changed files with 28 additions and 8 deletions

View File

@@ -254,6 +254,8 @@ const useLightrangeGraph = () => {
delete fetchStatusRef.current[fetchKey];
}
// Reset fetching state after all updates are complete
// Reset camera view by triggering FocusOnNode component
state.setMoveToSelectedNode(true);
state.setIsFetching(false);
}).catch(() => {
// Reset fetching state and remove flag in case of error