Skip to content

Commit

Permalink
#4757 - Incorrect stereo-label placement for (E) and (Z) (#5511)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrodionov91 authored and Guch1g0v committed Oct 17, 2024
1 parent e1292d9 commit 62a1f6d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions packages/ketcher-core/src/application/render/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,13 @@ function drawCIPLabel({
atomOrBond,
options,
});
const box = relBox(cipValuePath.path.getBBox());

cipValuePath.path.translateAbs(0.5 * box.width, -0.5 * box.height);
if (atomOrBond instanceof Atom) {
const box = relBox(cipValuePath.path.getBBox());

cipValuePath.path.translateAbs(0.5 * box.width, -0.5 * box.height);
}

path.push(cipValuePath.path.toFront());

restruct.addReObjectPath(LayerMap.additionalInfo, visel, path, null, true);
Expand Down

0 comments on commit 62a1f6d

Please sign in to comment.