feat: Refactor connection rendering logic for improved layout and offset handling
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2026-01-01 17:18:54 +01:00
parent fa7e68ca10
commit 35765b90e6

View File

@@ -55,8 +55,8 @@
<!-- Apply horizontal offset only to the mid bridge and second segment fan-out; also shift vertical line to keep continuity -->
{@const midLeft = fromLeft + horizontalDistance / 2 + connection.offset}
{@const firstSegmentWidth = horizontalDistance / 2}
{@const secondSegmentWidth = horizontalDistance / 2}
{#if firstSegmentWidth > 0}
<div
class="horizontal-line"
style="
@@ -81,9 +81,10 @@
background-color: {connection.color};
left: {midLeft}px;
top: {toTop + connection.offset / 4}px;
width: {secondSegmentWidth - connection.offset}px;
width: {firstSegmentWidth - connection.offset}px;
"
></div>
{/if}
{/each}
{/key}
</div>