@diagrammo/dgmo 0.18.0 → 0.18.1
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 +4 -4
- package/dist/advanced.cjs +5 -5
- package/dist/advanced.js +5 -5
- package/dist/auto.cjs +6 -6
- package/dist/auto.js +25 -25
- package/dist/auto.mjs +6 -6
- package/dist/cli.cjs +26 -26
- package/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/dist/internal.cjs +5 -5
- package/dist/internal.js +5 -5
- package/docs/language-reference.md +672 -42
- package/package.json +1 -1
- package/src/d3.ts +10 -7
- package/src/utils/legend-layout.ts +5 -2
package/package.json
CHANGED
package/src/d3.ts
CHANGED
|
@@ -2980,9 +2980,10 @@ function renderMarkers(
|
|
|
2980
2980
|
// Reserved-row mode lifts the label above the chart edge; legacy mode
|
|
2981
2981
|
// keeps it at y=6 inside the chart top.
|
|
2982
2982
|
const labelY = useReservedRow ? reservedLabelY! : 6;
|
|
2983
|
-
// Diamond
|
|
2984
|
-
//
|
|
2985
|
-
|
|
2983
|
+
// Diamond sits fully above the chart edge in reserved-row mode so it
|
|
2984
|
+
// isn't clipped by group bars that start at y=0; legacy mode keeps the
|
|
2985
|
+
// diamond inside the chart top below the label.
|
|
2986
|
+
const diamondY = useReservedRow ? -(diamondSize + 1) : labelY + 14;
|
|
2986
2987
|
const lineTop = diamondY + diamondSize;
|
|
2987
2988
|
|
|
2988
2989
|
// Compute available label width based on nearest-neighbor distance.
|
|
@@ -4773,11 +4774,13 @@ function renderTimelineHorizontalGrouped(
|
|
|
4773
4774
|
const isCollapsed = collapsedGroups.has(lane.name);
|
|
4774
4775
|
const toggleIcon = isCollapsed ? '▶' : '▼';
|
|
4775
4776
|
|
|
4776
|
-
// Header label band — gantt-style: spans only the left label column
|
|
4777
|
+
// Header label band — gantt-style: spans only the left label column.
|
|
4778
|
+
// Band height matches the event bar height (sBarH) instead of the full
|
|
4779
|
+
// row stride (rowH), leaving a small gap below — same look as gantt.
|
|
4777
4780
|
const bandX = -margin.left + 5;
|
|
4778
4781
|
const bandW = margin.left - 7;
|
|
4779
4782
|
const bandY = curY;
|
|
4780
|
-
const bandH =
|
|
4783
|
+
const bandH = sBarH;
|
|
4781
4784
|
const sBandRx = ctx.structural(4);
|
|
4782
4785
|
const sBandAccentW = ctx.structural(4);
|
|
4783
4786
|
|
|
@@ -4825,7 +4828,7 @@ function renderTimelineHorizontalGrouped(
|
|
|
4825
4828
|
headerG
|
|
4826
4829
|
.append('text')
|
|
4827
4830
|
.attr('x', -margin.left + ctx.aesthetic(10))
|
|
4828
|
-
.attr('y', curY +
|
|
4831
|
+
.attr('y', curY + sBarH / 2)
|
|
4829
4832
|
.attr('dy', '0.35em')
|
|
4830
4833
|
.attr('text-anchor', 'start')
|
|
4831
4834
|
.attr('fill', textColor)
|
|
@@ -4860,7 +4863,7 @@ function renderTimelineHorizontalGrouped(
|
|
|
4860
4863
|
.attr('x', sx1)
|
|
4861
4864
|
.attr('y', curY)
|
|
4862
4865
|
.attr('width', groupBarW)
|
|
4863
|
-
.attr('height',
|
|
4866
|
+
.attr('height', sBarH)
|
|
4864
4867
|
.attr('rx', sBarRx)
|
|
4865
4868
|
.attr('fill', shapeFill(palette, laneColor, isDark, { solid }))
|
|
4866
4869
|
.attr('stroke', laneColor)
|
|
@@ -101,10 +101,13 @@ function capsuleWidth(
|
|
|
101
101
|
const maxCapsuleW = containerWidth;
|
|
102
102
|
const baseW = LEGEND_CAPSULE_PAD * 2 + pw + 4 + addonWidth;
|
|
103
103
|
|
|
104
|
-
// Try single row first
|
|
104
|
+
// Try single row first. Tolerate sub-pixel float drift: the caller
|
|
105
|
+
// typically sizes its container to exactly match singleRowW, and FP
|
|
106
|
+
// associativity in intermediate sums can leave maxCapsuleW short by
|
|
107
|
+
// ~1e-14 (same family of bug fixed in 069a327 for the per-entry pass).
|
|
105
108
|
const ew = entriesWidth(entries);
|
|
106
109
|
const singleRowW = baseW + ew;
|
|
107
|
-
if (singleRowW <= maxCapsuleW) {
|
|
110
|
+
if (singleRowW <= maxCapsuleW + 0.5) {
|
|
108
111
|
return {
|
|
109
112
|
width: singleRowW,
|
|
110
113
|
entryRows: 1,
|