Skip to content

Commit

Permalink
#4311 - Macro: Send monomer library from Ketcher to Indigo upon monom…
Browse files Browse the repository at this point in the history
…ers import/export
  • Loading branch information
ilya-asiyuk-epam committed May 30, 2024
1 parent c4042b5 commit 2a6b317
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
import { IKetMacromoleculesContent } from 'ketcher-core';

// TODO add typings for Indigo standalone object
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -81,7 +82,12 @@ export interface WithSelection {
}

export interface CommandOptions {
[key: string]: string | number | boolean | undefined;
[key: string]:
| IKetMacromoleculesContent
| string
| number
| boolean
| undefined;
}

export interface CommandData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import {
StructService,
StructServiceOptions,
getLabelRenderModeForIndigo,
CoreEditor,
} from 'ketcher-core';

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Expand Down Expand Up @@ -292,10 +293,13 @@ class IndigoService implements StructService {
}
}
};
const monomerLibrary =
CoreEditor.provideEditorInstance().monomersLibraryParsedJson;
const commandOptions: CommandOptions = {
...this.defaultOptions,
...options,
'input-format': inputFormat,
monomerLibrary,
};

const commandData: ConvertCommandData = {
Expand Down

0 comments on commit 2a6b317

Please sign in to comment.