-
Notifications
You must be signed in to change notification settings - Fork 27
C visible, transparent atom labels #70
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
- Coverage 76.14% 76.05% -0.09%
==========================================
Files 56 56
Lines 4963 4970 +7
==========================================
+ Hits 3779 3780 +1
- Misses 1184 1190 +6
Continue to review full report at Codecov.
|
Thank you very much. That looks great! |
MolecularGraph.jl/src/draw/svg.jl Line 345 in 12679ba
The anchor seems to be OK. The centering should be,
|
From
To
text.x value is a half of g.width g.width is still environment dependent. (font-size / 2 * word count) would be a good guess. |
based on here, felt like this would work, but it doesn't. :( elem = """<g transform="translate($(pos.x), $(pos.y))">
<rect x="0" y="0" width="$(size)" height="$(size)" rx="$(size/2)" ry="$(size/2)" fill="$(bc)" opacity="$(opacity)" />
<text x="$(size/2)" y="$(size/2)" font-size="$(size)" fill="$(c)" text-anchor="middle" alignment-baseline="middle">$(text) </text>
</g>
""" |
The attribute name would be |
let me know if you have any requested changes, happy to make them.
one thing I couldn't figure out: the atom indices are not centered with the circles behind them. there is an offset. how can I fix this?
https://github.com/mojaie/MolecularGraph.jl/blob/master/src/draw/svg.jl#L334-L335 some change here?
here is my test for this: