Skip to content

Feat/element opacity#7

Merged
Mnikley merged 2 commits into
mainfrom
feat/element-opacity
Jul 10, 2026
Merged

Feat/element opacity#7
Mnikley merged 2 commits into
mainfrom
feat/element-opacity

Conversation

@Mnikley

@Mnikley Mnikley commented Jul 10, 2026

Copy link
Copy Markdown
Member

Adds a per-element Opacity slider (0–1) for nodes and edges in the styling panel, and fixes bubble-group layering in exports.

What's new

  • Opacity slider for nodes and edges under 🎨. Folds into the color's alpha, so it composes with colors that already carry transparency.
  • Map-by-data (∿) supported — scale opacity from a numeric property.
  • Round-trips through JSON and a new Excel Opacity column (documented in the template readme).

Fixes

  • Export z-order. PNG and SVG exports painted bubble-set hulls under nodes/edges, but the live view has drawn them on top since 1.15.1. On dense graphs this buried the hulls and made edges read as more opaque than on screen. Both exporters now coms and below labels, matching the live layer. (Only visible on largegraphs.)

Compatibility

Backward compatible — absent opacity defaults to 1 (fully opaque); older saved files render identically.

Tests

All 1402 pass. Added coverage for opacity→alpha across every node programmp/identity cases, Excel + scale-picker round-trips, and an SVG exportz-order regression test.

Mnikley added 2 commits July 10, 2026 09:47
A per-element Opacity slider (0-1) in the styling panel for nodes and
edges, folding into the color's alpha so it composes with colors that
already carry transparency. Threaded through every node program (SVG
texture, border-circle, native circle/square) and the edge stroke.

- Scale-by-property (∿) supported via the numeric scale picker
- Round-trips through JSON and a new Excel `Opacity` column, documented
  in the template readme tab
- Backward compatible: absent opacity defaults to 1 (fully opaque)
- Release: bump to 1.15.5, changelog entry

Tests: opacity->alpha across all node programs, edge-color composition, clamp/identity cases, and Excel + scale-picker round-trips.
…-order

PNG (toDataURL) and SVG (collectSvgScene) exports painted bubble-set
hulls beneath the node/edge mesh, but the live view has drawn them on top
(afterLayer: "nodes") since 1.15.1. On dense graphs the edges buried the
hulls and also read as more opaque than on screen. Both exporters now
composite hulls above nodes/edges and below labels. Sparse graphs were
unaffected, so this only showed on large graphs.

Added an SVG z-order regression test (node < body < label).
@Mnikley Mnikley merged commit 0df6972 into main Jul 10, 2026
2 checks passed
@Mnikley Mnikley deleted the feat/element-opacity branch July 10, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant