@usssa/component-library 1.0.0-alpha.232 → 1.0.0-alpha.234
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -742,7 +742,7 @@ const renderBracket = () => {
|
|
|
742
742
|
})
|
|
743
743
|
|
|
744
744
|
// 3. Render edges correctly
|
|
745
|
-
const edgeMargin =
|
|
745
|
+
const edgeMargin = 4 // Space between edge and node
|
|
746
746
|
games.value.forEach((game) => {
|
|
747
747
|
// --- Render WINNER edges ---
|
|
748
748
|
const winnerDest = game.winnerDestination
|
|
@@ -787,28 +787,18 @@ const renderBracket = () => {
|
|
|
787
787
|
|
|
788
788
|
if (mx > sx) {
|
|
789
789
|
// Winner is to the right (standard winner's bracket)
|
|
790
|
-
const
|
|
790
|
+
const midX = (sx + nodeWidth + mx - edgeMargin) / 2
|
|
791
791
|
path.moveTo(sx + nodeWidth + edgeMargin, sy + nodeHeight / 2)
|
|
792
|
-
path.
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
mx - curve,
|
|
796
|
-
my + nodeHeight / 2,
|
|
797
|
-
mx - edgeMargin,
|
|
798
|
-
my + nodeHeight / 2
|
|
799
|
-
)
|
|
792
|
+
path.lineTo(midX, sy + nodeHeight / 2)
|
|
793
|
+
path.lineTo(midX, my + nodeHeight / 2)
|
|
794
|
+
path.lineTo(mx - edgeMargin, my + nodeHeight / 2)
|
|
800
795
|
} else {
|
|
801
796
|
// Winner is to the left (advancing in loser's bracket)
|
|
802
|
-
const
|
|
803
|
-
path.moveTo(sx - edgeMargin, sy + nodeHeight / 2)
|
|
804
|
-
path.
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
mx + nodeWidth + curve,
|
|
808
|
-
my + nodeHeight / 2,
|
|
809
|
-
mx + nodeWidth + edgeMargin,
|
|
810
|
-
my + nodeHeight / 2 // End just outside destination node
|
|
811
|
-
) // End on right of destination
|
|
797
|
+
const midX = (sx - edgeMargin + mx + nodeWidth) / 2
|
|
798
|
+
path.moveTo(sx - edgeMargin, sy + nodeHeight / 2)
|
|
799
|
+
path.lineTo(midX, sy + nodeHeight / 2)
|
|
800
|
+
path.lineTo(midX, my + nodeHeight / 2)
|
|
801
|
+
path.lineTo(mx + nodeWidth + edgeMargin, my + nodeHeight / 2)
|
|
812
802
|
}
|
|
813
803
|
|
|
814
804
|
g.append('path')
|
|
@@ -858,23 +848,18 @@ const renderBracket = () => {
|
|
|
858
848
|
const isEdgeHighlighted = highlight.edges.some(
|
|
859
849
|
(e) => e.from === sourceNodeId && e.to === loserNodeId
|
|
860
850
|
)
|
|
861
|
-
const curve = (sx - (lx + nodeWidth)) * 0.9
|
|
862
851
|
const path = d3.path()
|
|
863
|
-
|
|
864
|
-
path.
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
ly + nodeHeight / 2,
|
|
869
|
-
lx + nodeWidth + edgeMargin,
|
|
870
|
-
ly + nodeHeight / 2 // End just outside destination node
|
|
871
|
-
)
|
|
852
|
+
const midX = (sx - edgeMargin + lx + nodeWidth) / 2 // Midpoint for horizontal line
|
|
853
|
+
path.moveTo(sx - edgeMargin, sy + nodeHeight / 2)
|
|
854
|
+
path.lineTo(midX, sy + nodeHeight / 2) // Stop halfway horizontally
|
|
855
|
+
path.lineTo(midX, ly + nodeHeight / 2) // Go downward to destination
|
|
856
|
+
path.lineTo(lx + nodeWidth + edgeMargin, ly + nodeHeight / 2) // Final horizontal line to destination with margin
|
|
872
857
|
|
|
873
858
|
g.append('path')
|
|
874
859
|
.attr('class', 'edge-path')
|
|
875
860
|
.classed('highlighted', isEdgeHighlighted)
|
|
876
861
|
.attr('d', path.toString())
|
|
877
|
-
.attr('stroke-linecap', 'round')
|
|
862
|
+
.attr('stroke-linecap', 'round') // Changed to rounded end
|
|
878
863
|
})
|
|
879
864
|
}
|
|
880
865
|
}
|
|
@@ -1605,7 +1590,7 @@ svg
|
|
|
1605
1590
|
:deep(.edge-path)
|
|
1606
1591
|
fill: none !important
|
|
1607
1592
|
stroke: $neutral-4
|
|
1608
|
-
stroke-width:
|
|
1593
|
+
stroke-width: 4
|
|
1609
1594
|
opacity: 1
|
|
1610
1595
|
&.highlighted
|
|
1611
1596
|
stroke: $blue-8
|
|
@@ -660,6 +660,13 @@ watch(selectedTab, () => {
|
|
|
660
660
|
width: 18rem
|
|
661
661
|
overflow-y: auto
|
|
662
662
|
scrollbar-width: none
|
|
663
|
+
max-width: min-content
|
|
664
|
+
|
|
665
|
+
.u-custom-options
|
|
666
|
+
gap: $xxs
|
|
667
|
+
|
|
668
|
+
.q-item__section--main
|
|
669
|
+
word-break: break-word
|
|
663
670
|
|
|
664
671
|
.u-custom-options
|
|
665
672
|
margin: $xxs
|
|
@@ -557,8 +557,15 @@ watch(
|
|
|
557
557
|
max-height: 11.25rem !important
|
|
558
558
|
overflow-y: auto
|
|
559
559
|
scrollbar-width: none
|
|
560
|
+
max-width: min-content
|
|
560
561
|
|
|
561
562
|
.u-options-menu
|
|
562
563
|
.q-item:last-child
|
|
563
564
|
margin-bottom: $xxs
|
|
565
|
+
|
|
566
|
+
.u-menu-link
|
|
567
|
+
gap: $xxs
|
|
568
|
+
|
|
569
|
+
.q-item__section--main
|
|
570
|
+
word-break: break-word
|
|
564
571
|
</style>
|