Skip to content

Commit df79de8

Browse files
committed
touchup: increase edge label width for layout
Could use the average-width to try and balance using too much space vs using too little space, but it doesn't seem like a big deal to use too much space, whereas labels still overlapping basically forfeits a lot of the value of trying to avoid overlap.
1 parent e90da88 commit df79de8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/web/topic/utils/layout.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ export type Orientation = "DOWN" | "UP" | "RIGHT" | "LEFT";
1212
export const orientation: Orientation = "DOWN" as Orientation; // not constant to allow potential other orientations in the future, and keeping code that currently exists for handling "LEFT" orientation
1313

1414
/**
15-
* Roughly accurate, using the average-length "addresses" label
15+
* Using the highest-width of the common labels ("subproblem of"; excludes "contingency for" because
16+
* that's rarely used).
17+
*
18+
* Could use the average-width to try and balance using too much space vs using too little space,
19+
* but it doesn't seem like a big deal to use too much space, whereas labels still overlapping
20+
* basically forfeits a lot of the value of trying to avoid overlap.
1621
*/
17-
export const labelWidthPx = 85;
22+
export const labelWidthPx = 115;
1823

1924
const priorities = Object.fromEntries(nodeTypes.map((type, index) => [type, index.toString()])) as {
2025
[type in NodeType]: string;

0 commit comments

Comments
 (0)