Skip to content

Release v2.6.1

Choose a tag to compare

@Stukova Stukova released this 15 Nov 19:49
· 453 commits to main since this release

🎉 What's New

Pinned Points

Screen.Recording.2025-11-05.at.11.30.15.mov

Pin specific points to fix them in position while still allowing them to participate in force calculations. Pinned points:

  • Do not move due to physics forces (gravity, repulsion, link forces, etc.)
  • Still participate in force calculations (other nodes are attracted to/repelled by them)
  • Can still be dragged by the user if enableDrag is true
// Pin specific points by their indices
graph.setPinnedPoints([0, 5, 10])

// Unpin all points
graph.setPinnedPoints([])
// or
graph.setPinnedPoints(null)

API Changes

Deprecation Notice: The pointColor and linkColor configuration options have been renamed to pointDefaultColor and linkDefaultColor respectively for better clarity. The old options are still supported but will be removed in a future version.

// New recommended approach
const config = {
  pointDefaultColor: '#b3b3b3',
  linkDefaultColor: '#666666'
}

// Deprecated (still works but will be removed)
const config = {
  pointColor: '#b3b3b3',  // ⚠️ Use pointDefaultColor instead
  linkColor: '#666666'    // ⚠️ Use linkDefaultColor instead
}

Bug Fixes

  • Fixed image sizes buffer not updating when adding points dynamically
  • Fixed tracked positions not updating after drag operations when simulation is disabled

Check out the new Pinned Points story in the documentation for a complete working example!