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

Can not fetch svg format #7

Open
DevanshiShah29 opened this issue Dec 10, 2020 · 1 comment
Open

Can not fetch svg format #7

DevanshiShah29 opened this issue Dec 10, 2020 · 1 comment

Comments

@DevanshiShah29
Copy link

DevanshiShah29 commented Dec 10, 2020

Hi, I’m using jsme-react library in one of my projects.
In the project, the aim is to display smiles along with the svg format which I am unable to achieve with library.


I am able to achieve the desired result by adding the “getMolecularAreaGraphicsString()” method in onChange event as shown in below code snippet:

_defineProperty(_assertThisInitialized(_this), "handleChange", function (jsmeEvent) {
  if (_this.props.onChange) {
    _this.props.onChange(jsmeEvent.src.smiles(),
    _this.jsmeApplet.getMolecularAreaGraphicsString()
    );
  }
});

Are there any other options by which the desired output can be achieved? Any kind of help/suggestions would be appreciated

@jsme-editor
Copy link

Just a note or recommendation. It is better to use jsmeEvent.src instead of _this.jsmeApplet. Both point to the same editor, but in case the page has more than one instance of JSME, jsmeEvent.src will provide the right JSME instance that has triggered the event.

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

No branches or pull requests

2 participants