Skip to content

Commit

Permalink
#5670 – Update UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svvald committed Dec 27, 2024
1 parent 80717f0 commit 6d60724
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 8 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.
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.
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.
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.
17 changes: 9 additions & 8 deletions packages/ketcher-core/src/application/editor/actions/sgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,17 @@ export function setExpandMonomerSGroup(
});
});

atomsToMove.forEach((atomIds, key) => {
if (handledAtoms.has(key)) {
atomsToMove.forEach((atomIds) => {
const intactAtoms = atomIds.filter((aid) => !handledAtoms.has(aid));
if (intactAtoms.length === 0) {
return;
}

const sGroups = sGroupsToMove.get(key) ?? [];
const subStructBBox = SGroup.getObjBBox(atomIds, restruct.molecule, true);
const subStructBBox = SGroup.getObjBBox(
intactAtoms,
restruct.molecule,
true,
);
const subStructCenter = new Vec2(
subStructBBox.p0.x + (subStructBBox.p1.x - subStructBBox.p0.x) / 2,
subStructBBox.p0.y + (subStructBBox.p1.y - subStructBBox.p0.y) / 2,
Expand All @@ -378,12 +382,9 @@ export function setExpandMonomerSGroup(

const finalMoveVector = attrs.expanded ? moveVector : moveVector.negated();

atomIds.forEach((atomId) => {
intactAtoms.forEach((atomId) => {
action.addOp(new AtomMove(atomId, finalMoveVector));
});
sGroups.forEach((sGroupId) => {
action.addOp(new SGroupDataMove(sGroupId, finalMoveVector));
});
});

sGroupAtoms.forEach((aid) => {
Expand Down

0 comments on commit 6d60724

Please sign in to comment.