-
Notifications
You must be signed in to change notification settings - Fork 187
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
#1852 Implements automatic selection of mol encoding #1870
Conversation
@@ -29,6 +29,22 @@ import assert from 'assert' | |||
import { EventEmitter } from 'events' | |||
import { runAsyncAction } from 'utilities' | |||
|
|||
const Format = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to add type for this object. It can be something like:
const Format: {
[key in SupportedFormat]: SupportedFormat
}
This way you don't need to write
Format.SomeFormat as SupportedFormat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, pls check if it is a good solution
@@ -117,7 +122,7 @@ const MiewDialog = ({ | |||
(miew: MiewAsType) => { | |||
miewRef.current = miew | |||
const factory = new FormatterFactory(server) | |||
const service = factory.create('cml') | |||
const service = factory.create('cml' as SupportedFormat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also change to SupportedFormat.cml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
5dc82ec
to
612fff2
Compare
Implements automatic selection of mol encoding: add "molAuto" to SupportedFormat type and to formatProperties - with { 'molfile-saving-mode': 'auto' } option.