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

Implement miew viewer with miew-react #1188

Closed
AnaMoskvina opened this issue Jan 17, 2022 · 0 comments · Fixed by #1211
Closed

Implement miew viewer with miew-react #1188

AnaMoskvina opened this issue Jan 17, 2022 · 0 comments · Fixed by #1211
Assignees
Milestone

Comments

@AnaMoskvina
Copy link
Contributor

The miew-react package exports (with default export) react component, which accepts two optional props:

  • 'options': an object with optional 'settings', 'reps', 'load' fields (basically, miewOpts in current implementation)
  • 'onInit': function which is called after initialization of Miew instance with a Miew instance as a parameter; thus a Miew instance and its' methods (as 'load', 'setOptions' or 'exportCML') can be available in the parent component (consider saving returned Miew instance into a variable)
  • the component occupies 100% of the parent component's width and height
@AnaMoskvina AnaMoskvina added this to the Release 2.5.0 milestone Jan 17, 2022
@AndreiMazol AndreiMazol self-assigned this Jan 17, 2022
@Alex-Work-Account Alex-Work-Account linked a pull request Jan 27, 2022 that will close this issue
AndreiMazol pushed a commit that referenced this issue Feb 1, 2022
* Update miew package to newest version

* Install miew-react and refactor MiewDialog with it

* convert Miew.jsx file to .tsx and add some types

* ts fix

* Remove ts ignore

* Pr fixes

* Remove unused styles

* Temporary style fixes for inner divs in Viewer

* PR fixes and refactor

* Remove miew package from example and refactor ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants