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

BUG: nglview disables scroll in html emebed #840

Closed
hainm opened this issue Aug 2, 2019 · 7 comments
Closed

BUG: nglview disables scroll in html emebed #840

hainm opened this issue Aug 2, 2019 · 7 comments

Comments

@hainm
Copy link
Collaborator

hainm commented Aug 2, 2019

https://nbviewer.jupyter.org/github/arose/nglview/blob/644fa66a8461b52c01a5e4df4d2a99486b690fea/notebooks/custom_color.ipynb

@hainm
Copy link
Collaborator Author

hainm commented Aug 2, 2019

uhm, happens from v2.5.0 (v2.2.0 is fine), where the NGL's GUI is introduced.

@hainm
Copy link
Collaborator Author

hainm commented Aug 2, 2019

@arose Any idea why?
It seems that if importing https://github.com/arose/ngl/blob/master/examples/css/main.css, the webpage can not be scrolled (Please check the notebook link above). thanks.

@hainm
Copy link
Collaborator Author

hainm commented Aug 2, 2019

In nglview's context, whenever a view is created, nglview-js-widgets will be required in browser and the main.css will be loaded (https://github.com/arose/nglview/blob/9e25a50c8f1438f596b2971ec1dbb30e79a05a68/js/src/widget_ngl.js#L20)

@dwhswenson
Copy link

I reproduce this bug if using nbconvert locally, but interestingly, it doesn't seem to happen when I use nbsphinx. (However, I did have to sort out a CSS clash with the syntax highlighting.)

You can try it yourself by checking out dwhswenson/contact_map#62 and running make html from the docs/ directory. Under the examples, it's the notebook on plotting drug binding hotspots.

I haven't looked to debug the difference -- my main goal was to have NGLView running in our sphinx docs, and now it does!

@hainm
Copy link
Collaborator Author

hainm commented Aug 2, 2019

thanks, I've tried.

my main goal was to have NGLView running in our sphinx docs, and now it does!

yay, cool enough.

@hainm
Copy link
Collaborator Author

hainm commented Aug 3, 2019

@hainm hainm closed this as completed Aug 3, 2019
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