feat: Refactor connection rendering logic for improved layout and offset handling
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user