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

Parameters not working in my implementation for jsme-react #4

Open
mwbouwkamp opened this issue Nov 28, 2020 · 1 comment
Open

Parameters not working in my implementation for jsme-react #4

mwbouwkamp opened this issue Nov 28, 2020 · 1 comment

Comments

@mwbouwkamp
Copy link

mwbouwkamp commented Nov 28, 2020

I have the following implementation of jsme-react. Settings are working nicely (these are passed in as props), but the guicolor is not set. I probably implemented it incorrectly. Hope you can help.

import React, { createElement } from "react";
import { Jsme } from "jsme-react";

interface Props {
    settings: string;
    smiles: string;
    onStructureChange: (smiles: string) => void;
}

export const JSMEMain: React.FC<Props> = props => {
    return (
        <div>
            <Jsme
                height="300px"
                width="400px"
                options={props.settings}
                guicolor="#FF0000"
                smiles={props.smiles}
                onChange={props.onStructureChange}
            />
        </div>
    );
};

@danyx23
Copy link
Contributor

danyx23 commented Nov 30, 2020

At the moment only the options string is supported, the parameters (described in the parameters section here https://peter-ertl.com/jsme/JSME_2020-06-11/doc.html) of which guicolor is one is not currently passed on to JSME. I had a quick attempt at changing this (you can have a look in the parameters branch in this repo) but this seems not to work as expected. If you want to investigate to implement this I would be happy to accept a PR :)

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