diff --git a/packages/ketcher-core/src/application/render/restruct/rebond.ts b/packages/ketcher-core/src/application/render/restruct/rebond.ts index 44628dae5d..44ff344d57 100644 --- a/packages/ketcher-core/src/application/render/restruct/rebond.ts +++ b/packages/ketcher-core/src/application/render/restruct/rebond.ts @@ -525,6 +525,8 @@ function getBondPath( const shiftA = !restruct.atoms.get(hb1.begin)?.showLabel; const shiftB = !restruct.atoms.get(hb2.begin)?.showLabel; let newHalfBonds: [HalfBond, HalfBond]; + const xShiftMinus1 = -1; + const xShiftPlus1 = 1; switch (bond.b.type) { case Bond.PATTERN.TYPE.SINGLE: switch (bond.b.stereo) { @@ -637,7 +639,7 @@ function getBondPath( break; } case Bond.PATTERN.TYPE.SINGLE_OR_DOUBLE: - newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, 1); + newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, xShiftPlus1); path = getSingleOrDoublePath( render, newHalfBonds[0], @@ -657,7 +659,7 @@ function getBondPath( ); break; case Bond.PATTERN.TYPE.DOUBLE_OR_AROMATIC: - newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, -1); + newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, xShiftMinus1); path = getBondAromaticPath( render, newHalfBonds[0], @@ -669,7 +671,7 @@ function getBondPath( ); break; case Bond.PATTERN.TYPE.ANY: - newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, -1); + newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, xShiftMinus1); path = draw.bondAny( render.paper, newHalfBonds[0], @@ -679,7 +681,7 @@ function getBondPath( ); break; case Bond.PATTERN.TYPE.HYDROGEN: - newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, 1); + newHalfBonds = util.updateHalfBondCoordinates(hb1, hb2, xShiftPlus1); path = draw.bondHydrogen( render.paper, newHalfBonds[0],