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

feat: generate blob for the spectra from an outside component #1589

Merged
merged 2 commits into from Jun 21, 2022

Conversation

hamed-musallam
Copy link
Member

@targos
we use useImperativeHandle to customize the instance value that is exposed to parent components when using ref so it is possible to call the generate a Blob function, and then they can do whatever they need with this blob, to store it in the database or save as png or svg ... etc in an external file server.

#1569

@hamed-musallam hamed-musallam linked an issue Jun 21, 2022 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Jun 21, 2022

Deploy Preview for nmrium ready!

Name Link
🔨 Latest commit cc91620
🔍 Latest deploy log https://app.netlify.com/sites/nmrium/deploys/62b1bd6d651ae70008da07f9
😎 Deploy Preview https://deploy-preview-1589--nmrium.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@targos
Copy link
Member

targos commented Jun 21, 2022

Implementation LGTM but can we find a better name for the exposed method?

@hamed-musallam
Copy link
Member Author

@targos

Implementation LGTM but can we find a better name for the exposed method?

I really do not know, this is what comes to my mind, we can call it getView() or something similar

@targos
Copy link
Member

targos commented Jun 21, 2022

The name can contain the word "Blob" because it's part of what is returned, but I think it should also have a hint about what the blob contains (an image? of what?)

@hamed-musallam
Copy link
Member Author

@targos

getSpectraViewerBlob or generateSpectraViewerBlocb ?

@targos
Copy link
Member

targos commented Jun 21, 2022

getSpectraViewerAsBlob ?

@hamed-musallam
Copy link
Member Author

@targos
thanks, I will make the changes and then merge the PR

@hamed-musallam hamed-musallam merged commit d64597c into master Jun 21, 2022
@hamed-musallam hamed-musallam deleted the generate-image branch June 21, 2022 13:09
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

Successfully merging this pull request may close these issues.

Generate image of the spectrum from outside component
2 participants