Skip to content

Release v1.1.0

Choose a tag to compare

@rokotyan rokotyan released this 04 Oct 04:21
· 278 commits to main since this release

Cosmos 1.1.0 introduces a number of graph interactions, such as:

  • Select a node or multiple nodes by their indices or ids;
  • Select all nodes in a rectangular area;
  • Zoom to a specific node;
  • Fit the graph view to contain all the nodes.

There're three new configuration properties:

  • nodeGreyoutOpacity and linkGreyoutOpacity allow you to set the opacity of non-selected nodes and links when selection is active;
  • scaleNodesOnZoom (true by default) enables node scaling depending on the zoom level. This will allow to easier pick a node when you zoom in.

The onClick callback will now have four arguments instead of two: node, its index, position, and the corresponding event.

You can find the full list of available methods and properties in the readme file. We've also updated our CodeSandbox example to show you how to use them.

cosmos-1 1 0-codesandbox

Nikita & The Cosmograph Team