Skip to content

Commit

Permalink
Tweak IUPAC symbol visibility in, only show carbons with colinear bon…
Browse files Browse the repository at this point in the history
…ds if both bond orders are the same.
  • Loading branch information
johnmay committed Feb 27, 2017
1 parent 34a8908 commit c57989a
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -128,10 +128,12 @@ public boolean visible(IAtom atom, List<IBond> bonds, RendererModel model) {
if (mass != null && !isMajorIsotope(element.number(), mass)) return true;

// no kink between bonds to imply the presence of a carbon and it must
// be displayed
if (hasParallelBonds(atom, bonds)) {
// TODO only when both bonds are single?
return true;
// be displayed if the bonds have the same bond order
if (bonds.size() == 2 &&
bonds.get(0).getOrder() == bonds.get(1).getOrder()) {
IBond.Order bndord = bonds.get(0).getOrder();
if (bndord == IBond.Order.DOUBLE || hasParallelBonds(atom, bonds))
return true;
}

// special case ethane
Expand Down

0 comments on commit c57989a

Please sign in to comment.