Skip to content

Commit

Permalink
Merge branch 'release/2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiMazol committed Jan 13, 2022
2 parents b52792e + 622b0bb commit 88a2de6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/ketcher-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-core",
"version": "1.2.0",
"version": "1.2.1",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down
4 changes: 4 additions & 0 deletions packages/ketcher-core/src/application/ketcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ export class Ketcher {
assert(typeof structStr === 'string')

const struct: Struct = await parseStruct(structStr, this.#structService)
struct.initHalfBonds()
struct.initNeighbors()
struct.setImplicitHydrogen()
struct.markFragments()
this.#editor.struct(struct)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ketcher-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-react",
"version": "2.4.0",
"version": "2.4.1",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down
5 changes: 4 additions & 1 deletion packages/ketcher-react/src/script/editor/tool/paste.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ function PasteTool(editor, struct) {
this.functionalGroups = this.molecule.functionalGroups

const rnd = editor.render
const point = editor.lastEvent ? rnd.page2obj(editor.lastEvent) : null
const { clientHeight, clientWidth } = rnd.clientArea
const point = editor.lastEvent
? rnd.page2obj(editor.lastEvent)
: rnd.page2obj({ pageX: clientWidth / 2, pageY: clientHeight / 2 })

const [action, pasteItems] = fromPaste(rnd.ctab, this.struct, point)
this.action = action
Expand Down
2 changes: 1 addition & 1 deletion packages/ketcher-standalone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-standalone",
"version": "1.3.0",
"version": "1.3.1",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down

0 comments on commit 88a2de6

Please sign in to comment.