Skip to content

Label geoms should be aware of arrowhead geometry #95

Description

@wilkox

Problem

geom_gene_label() and geom_subgene_label() use the full xmin/xmax (or xsubmin/xsubmax) boundaries as the bounding box for fitting text. This means the label bounding box extends into the arrowhead region of the gene arrow, which can cause text to intersect with the arrow outline as it narrows to a point.

Expected behavior

Labels should be constrained to the rectangular body of the arrow, excluding the arrowhead region. This would prevent text from overlapping with the diagonal edges of the arrowhead.

Affected geoms

  • geom_gene_label()
  • geom_subgene_label()

Implementation considerations

  • The label geoms would need access to the arrowhead width (currently defined in geom_gene_arrow() and geom_subgene_arrow())
  • The forward aesthetic determines which end of the gene has the arrowhead
  • This affects all coordinate systems (Cartesian, flipped, polar)

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions