Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more accurate estimator for feature label widths #2106

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Jul 5, 2021

The code for estimating feature label widths is a heuristic to avoid having to measure them precisely with getBBox or similar. This updates the heuristic to use a slightly better measurement from @jbrowse/core called measureText, and adds a small "padding" too

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Jul 5, 2021
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Jul 5, 2021
@cmdcolin cmdcolin force-pushed the measuretext_svgfeatures branch from 5c0cd55 to a2e1af5 Compare July 6, 2021 12:36
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #2106 (a2e1af5) into main (591ec2c) will increase coverage by 0.01%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2106      +/-   ##
==========================================
+ Coverage   61.98%   62.00%   +0.01%     
==========================================
  Files         476      476              
  Lines       22790    22791       +1     
  Branches     5349     5350       +1     
==========================================
+ Hits        14126    14131       +5     
+ Misses       8382     8378       -4     
  Partials      282      282              
Impacted Files Coverage Δ
...src/SvgFeatureRenderer/components/FeatureLabel.tsx 75.00% <75.00%> (-3.58%) ⬇️
packages/core/util/index.ts 79.89% <100.00%> (+1.32%) ⬆️
...gFeatureRenderer/components/SvgFeatureRendering.js 55.64% <100.00%> (-0.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 591ec2c...a2e1af5. Read the comment docs.

@cmdcolin cmdcolin merged commit 85e8e51 into main Jul 7, 2021
@cmdcolin cmdcolin deleted the measuretext_svgfeatures branch July 7, 2021 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant