Releases: cosmosgl/graph
Releases · cosmosgl/graph
Release v1.2.0
What's new:
- Zoom events. You can now add callbacks to
onZoomStart
,onZoom
andonZoomEnd
events in the config; - New API method
fitViewByNodeIds
. This feature was implemented thanks to @GoodNovember's feedback in issue #13.
Fixed:
- More precise point search on mouse click.
Release v1.1.3
What's new:
- Selecting adjacent nodes. We've added a second argument to the
selectNodeById
andselectNodeByIndex
API methods for selecting adjacent nodes. When it'strue
, calling those functions will also select the adjacent nodes to the specified node. The default value isfalse
. This feature was implemented thanks to @GoodNovember's feedback in issue #13. - New API method
getAdjacentNodes
. - Empty selection. You can now set an empty selection by providing an empty array to the
selectNodesByIds
andselectNodesByIndices
API methods. If you want to reset the selection, passnull
.
See version 1.1.0 release notes for the latest new features announcement.
Release v1.1.2
Fixes:
- Adding
"type":"module"
to package.json for correct library import
See version 1.1.0 release notes for the latest new features announcement.
Release v1.1.1
Fixes:
- #9
getNodePositions
returns incorrect positions - Vulnerability detected in d3-color
See version 1.1.0 release notes for the latest new features announcement.
Release v1.1.0
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
andlinkGreyoutOpacity
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.
Nikita & The Cosmograph Team
Release v1.0.0
The first public release