Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Resolve label alignment of multiple groups, we still hide bonds but t…
…his should change text alignment as it would for abbreviations.
  • Loading branch information
johnmay committed Nov 21, 2015
1 parent 12132b6 commit c1ed381
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -316,17 +316,21 @@ private AtomSymbol[] generateAtomSymbols(IAtomContainer container,
if (isHiddenFully(atom))
continue;


boolean remapped = symbolRemap.containsKey(atom);
final List<IBond> bonds = container.getConnectedBondsList(atom);
final List<IAtom> neighbors = container.getConnectedAtomsList(atom);
final List<IAtom> visNeighbors = new ArrayList<>();

// if a symbol is remapped we only want to consider
// visible neighbors in the alignment calc, otherwise
// we include all neighbors
for (IAtom neighbor : neighbors) {
if (!isHidden(neighbor))
if (!remapped || !isHidden(neighbor))
visNeighbors.add(neighbor);
}

final List<Vector2d> auxVectors = new ArrayList<>(1);
boolean remapped = symbolRemap.containsKey(atom);

// only generate if the symbol is visible
if (visibility.visible(atom, bonds, parameters) || remapped) {
Expand Down

0 comments on commit c1ed381

Please sign in to comment.