react-sigma icon indicating copy to clipboard operation
react-sigma copied to clipboard

Combining code from Drag n drop demo with Controls demo can exclude dragged nodes from view after the See whole graph button in Zoom control is clicked.

Open willynilly opened this issue 1 year ago • 1 comments

Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests. If you have questions on how to use React & Sigma.js, please ask on StackOverflow instead of creating an issue here.

To help us understand your issue, please specify important details, primarily:

  • React-sigma-v2 version: 3.4.2
  • Sigma.js version : 2.4.0
  • Graphology version : 0.25.1"
  • Operating system: Windows
  • Web browser: 122.0.6261.112
  • Steps to reproduce
  • Expected behavior
  • -Clicking on See whole graph button in a Zoom control should zoom to include all nodes in the view after dragging a node out of the view. This is a bug with the Drag N Drop example. I added this code as well as the Zoom control, and this problem occurs.
  • Actual behavior
    • Clicking the See whole graph button excludes certain nodes from the view.

Additionally, include (as appropriate) console logs, stacktraces, screenshots, and other debug info.

Here's my pull request with the fix: https://github.com/sim51/react-sigma/pull/61

We recommend you to create a live example of your issue on CodeSandbox so we can reproduce it.

Example bug report

Modification of the node default color in the settings has no effect

React-sigma-v2: 0.0.5 Sigma.js version: 2.0.0-alpha40 Graphology version: 0.19.2 Operating System: Ubuntu 15.10 Web browser: Firefox 82.0.2

Steps to reproduce

Check the live example https://codesandbox.io/s/XXXX

Expected behavior

Nodes should be displayed in red

Actual behavior

Nodes are displayed in black

Note

If the issue has an inactivity of 30 days, it becomes stale. With an additional inactivity of 14 days, the issue is closed

willynilly avatar Mar 16 '24 13:03 willynilly

I changed the code of the example by taking the one from the sigma project, and it works better, but your issue is still there.

When I try to put the setCustomBbox on the onMouseUp, yes the bbox is updated and so the "see whole graph" feature works, but the camera changes also.

Ex: With the setCustomBbox on the onMouseUp, try to drag-n-drop a node outside of the window, and at the end of your action, the camera changed to see the whole graph. Personnaly, what I want is to have the same view, and if I click on the button to "see whole graph".

sim51 avatar Apr 05 '24 10:04 sim51