Skip to content

Release v1.5

Compare
Choose a tag to compare
@Stukova Stukova released this 29 Dec 02:28
· 12 commits to main since this release
df0613e

Cosmograph 1.5 brings a few exciting new features, along with bug fixes and optimizations.

What's new

  • Node Sampling: A new method getSampledNodePositionsMap has been introduced to enable you to sample a number of evenly distributed nodes visible on the screen. It comes in handy when you want to implement feature like dynamic node labels. You can control the number of nodes in the sample by specifying the nodeSamplingDistance configuration parameter. Thanks to this feature, we were able to introduce dynamic node labels in the latest Cosmograph.app update:

  • Fitting Nodes in the Scene on Initialization: Cosmos will now center and zoom the view to include all nodes in the scene upon initialization. You can use the following configuration options to control this behavior: fitViewOnInit, fitViewDelay, and fitViewByNodesInRect.

  • Rescaling Initial Position of Nodes: To avoid issues related to nodes having coordinates outside the simulation space boundaries, Cosmos will now rescale the initial coordinates of the nodes to fit within the simulation space if the simulation is active. This is useful when you load a graph with pre-calculated initial coordinates and want Cosmos to calculate the force layout for it.

Fixes

  • We have resolved the issue of switching between curve/straight line rendering after Cosmos initialization.

Optimization

  • Node sizes are now stored in an array for faster access.