Skip to content

Commit

Permalink
Update SingleRow.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Dec 23, 2024
1 parent f5f5ffa commit 360df33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gensplore-component/src/components/SingleRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function boxesOverlap(a, b) {
*/
function placeLabel(desiredX, y, text, usedBoxes, maxTries, featureX, featureWidth) {
const avgCharWidth = 6; // Tweak as needed
const labelWidth = text.length * avgCharWidth;
const labelWidth = text.length * avgCharWidth +10;
const labelHeight = 10; // Rough line height

// The label must fit within the feature: from featureX to (featureX + featureWidth - labelWidth).
Expand Down

0 comments on commit 360df33

Please sign in to comment.