Minor package updates (#8157)

- fixes static asset handler cast
- adds now required lessThan to graph layout (cc @jeremy-rifkin I think)
This commit is contained in:
Matt Godbolt
2025-10-02 13:35:25 -05:00
committed by GitHub
parent 5969cc924e
commit 69cd083301
4 changed files with 1688 additions and 1749 deletions

View File

@@ -68,6 +68,7 @@ type EdgeSegment = {
horizontalOffset: number;
verticalOffset: number;
type: SegmentType;
less_than(other: EdgeSegment): boolean;
};
type Edge = {
@@ -603,6 +604,12 @@ export class GraphLayoutCore {
horizontalOffset: 0,
verticalOffset: 0,
type: start_col === end_col ? SegmentType.Vertical : SegmentType.Horizontal,
less_than(other: EdgeSegment): boolean {
if (this.start.row !== other.start.row) return this.start.row < other.start.row;
if (this.start.col !== other.start.col) return this.start.col < other.start.col;
if (this.end.row !== other.end.row) return this.end.row < other.end.row;
return this.end.col < other.end.col;
},
});
const target = this.blocks[edge.dest];
// start just below the source block