Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro: #3531 – provide save/open ket and molv3000 ketcher api for macromolecules #3637

Conversation

Nitvex
Copy link
Collaborator

@Nitvex Nitvex commented Nov 30, 2023

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

closes #3531

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

export function deleteAllEntitiesOnCanvas() {
const editor = CoreEditor.provideEditorInstance();
const modelChanges = editor.drawingEntitiesManager.deleteAllEntities();
editor.renderersContainer.update(modelChanges);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we need to add changes to history also

deserialisedKet.drawingEntitiesManager.mergeInto(
editor.drawingEntitiesManager,
);
editor.renderersContainer.update(deserialisedKet.modelChanges);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here probably too

@Nitvex Nitvex linked an issue Dec 1, 2023 that may be closed by this pull request
@Nitvex Nitvex force-pushed the 3531-macro-provide-saveopen-ket-and-molv3000-ketcher-api-for-macromolecules branch 5 times, most recently from a6f58ff to a3e74d9 Compare December 4, 2023 10:17
@Nitvex Nitvex marked this pull request as ready for review December 4, 2023 11:42
README.md Outdated
Comment on lines 104 to 105
`setMolecule(structure: string): Promise<void>` – adds passed structure on the canvas. Current structure is not changed.
Parameters: `structure: string`. Structure is a string in any supported format.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it is 'addFragment', not 'setMolecule'

README.md Outdated
`getRxn(molfileFormat): Promise<string>` – returns `string` representation of drawn structure in RXN-format.
Parameters: `molfileFormat: 'v2000' | 'v3000'`. Optional, by default, 'v2000'. Indicates, in which format result will be returned.

`getKet(): Promise<string>` – returns `string` representation of drawn structure is internal Ket-format.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it planned to be "in internal Ket-format."

@Nitvex Nitvex force-pushed the 3531-macro-provide-saveopen-ket-and-molv3000-ketcher-api-for-macromolecules branch from a3e74d9 to 5b91202 Compare December 4, 2023 12:37
@Nitvex Nitvex merged commit 0ae0198 into master Dec 4, 2023
5 checks passed
@Nitvex Nitvex deleted the 3531-macro-provide-saveopen-ket-and-molv3000-ketcher-api-for-macromolecules branch December 4, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run pre-push hooks Macro: Provide save/open ket and molv3000 ketcher API for macromolecules
2 participants