Skip to content

Commit

Permalink
#3961 - Micro: System disorganize molecule and label during loading f…
Browse files Browse the repository at this point in the history
…rom ppx file (base64 cdx format) (#4019)

- fixed texts scaling (removed ignoring scaling for texts if there is no reaction in structure)

Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
  • Loading branch information
rrodionov91 and rrodionov91 authored Feb 2, 2024
1 parent 6f4f5b4 commit c981241
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/ketcher-core/src/domain/entities/struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,8 @@ export class Struct {
});

this.texts.forEach((item) => {
// Scale text only for reactions - i.e file contains reaction arrows
const isReactionStruct = this.rxnArrows.size;
if (isReactionStruct) {
item.pos = item.pos.map((p) => p.scaled(scale));
item.position = item.position.scaled(scale);
}
item.pos = item.pos.map((p) => p.scaled(scale));
item.position = item.position.scaled(scale);
});
}

Expand Down

0 comments on commit c981241

Please sign in to comment.