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

Autoresize Renderer #362

Open
akaszynski opened this issue Jul 28, 2021 · 4 comments
Open

Autoresize Renderer #362

akaszynski opened this issue Jul 28, 2021 · 4 comments

Comments

@akaszynski
Copy link
Contributor

First off, I'd like to thank the developers of this project. I've been able to make great strides plotting within jupyterlab and extending pyvista through pythreejs.

Is there any way to automatically resize the Renderer widget? This has been implemented in GanyJS:
https://github.com/QuantStack/GanyJS/blob/08deb4b9689ebf03e5b09985feb6677fe25858d8/src/Scene.ts#L126-L138

I'm having issues building this locally in a "development version" (see #361). Would this be that hard to implement on your end? Otherwise, I'd like to contribute.

@6A61736F6E206E61646572
Copy link

@akaszynski Did you manage to get the local build working?

@vidartf
Copy link
Member

vidartf commented Dec 6, 2021

This should be possible to do, yes. You would need to listen for the lumino resize event (e.g. like this), and then trigger the auto-resize function. After measuring the dimensions, you would set the _height and _width traits on the renderer model from the JS side. I would probably recommend putting this behind a autoresize trait that controls whether this feature is active or not.

@vidartf
Copy link
Member

vidartf commented Dec 6, 2021

Would this be that hard to implement on your end?

It isn't technically hard, but it is hard to put the time in for it.

@akaszynski
Copy link
Contributor Author

@akaszynski Did you manage to get the local build working?

Eventually, yes.

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 a pull request may close this issue.

3 participants