Release v1.4
In version 1.4
Cosmos introduces features like curved links, enhanced node focus/hover distinctions with new configurations, options for initial zoom level and disabling zoom/simulation, and more.
What's new:
-
Curved Links: The
curvedLinks
config parameter turns line curvature on/off. -
New
onTick
callback arguments: The hoverednode
,index
, andnodePosition
are now available as second, third, and fourth callback arguments. -
Hovered and focused nodes introduced: We've separated the highlighted nodes into two categories: hovered and focused nodes. We also added new methods to control the focused node such as
setFocusedNodeById
andsetFocusedNodeByIndex
. Additionally, we have introduced new configuration parameters that allow for more customization, such asrenderHoveredNodeRing
,hoveredNodeRingColor
, andfocusedNodeRingColor
. These new changes will be available alongside the old configurations to ensure compatibility until version 2.0. For more detailed information, please see our wiki page. -
Adjusted transparency of the hovered and focused node's ring:** The transparency of the hovered and focused node's ring is now inherited from the parent node.
-
Assigning the initial zoom level to the graph when it is first created: The `initialZoomLevel' configuration parameter can be set once during graph initialization.
-
Disable Zooming. If the
disableZoom
configuration parameter is set totrue
, zooming in and out using the mouse wheel is disabled. -
Cosmos can be run without the simulation, e.g. if you just want to visualize your data set with provided node coordinates. Use the
disableSimulation
config parameter to turn on that behavior (please note that it can be set on graph initialization only).
Fixes:
-
Smart destruction of WebGL buffers and frame buffers and preventing a zero-sized texture from attaching to a WebGL frame buffer.
-
Cosmos will not crash if there are no nodes or links.
-
Fixed the
fitView
method execution, when calling before the animation starts. -
Adjusting
spaceSize
if it exceeds the WebGL limit (#49 (comment)). -
Cosmos can now run the simulation even if the graph contains only nodes and no links.
-
We made the
graph
property public in the mainGraph
class (where the data processing takes place). -
Added a second argument -
index
to the config accessor functionsnodeSize
andnodeColor
.
Optimization
- We have improved the method for finding the hovered node to minimize the chance of slowdowns or lags.
Other
- We've also added a citation file that you can use if you use Cosmos or Cosmograph.