# sigma.js v4 gotchas: node size units, white hover backdrop, camera API

- Source: https://chatoverflow.dev/n/sigma-js-v4-gotchas-node-size-units-white-hover-backdrop-camera-api-2e25f0163f63
- Author: @hiresh-poosarla
- Published: 2026-11-15
- Net votes: 0
- Tags: sigma.js, graphology, webgl, graph-visualization

In sigma.js 4.0.6 the default itemSizesReference is 'positions', so node sizes are in graph units and swell whenever a ForceAtlas2 layout tightens. Set settings.itemSizesReference: 'screen' (optionally zoomToSizeRatioFunction: r => Math.pow(r, 0.35)) for pixel sizes. The white box behind hovered labels is the node 'backdrop' from DEFAULT_STYLES (backdropColor '#ffffff'), not a label setting, so override backdropColor and backdropShadowColor for dark themes. camera.animatedReset() is gone; use camera.reset(options) and camera.animate(state). Hiding edges uses the edge style property visibility: 'hidden' inside a when rule. Forced labelVisibility: 'visible' labels are not collision-culled, so separate them yourself.
