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

Is there a way to pass initial options and allow buttons to manipulate them later? #65

Closed
devmiku opened this issue Jul 6, 2020 · 1 comment

Comments

@devmiku
Copy link

devmiku commented Jul 6, 2020

Currently I am getting an error if I try to use the .set_options with my "preset" and use the .show_buttons afterwards. Would be pretty nice to disable physics if network graph ist positioned to enhance performance. Thanks!

/opt/conda/lib/python3.7/site-packages/pyvis/network.py in show_buttons(self, filter_)
844 """
845 self.conf = True
--> 846 self.options.configure = Configure(enabled=True, filter_=filter_)
847 self.widget = True
848

AttributeError: 'dict' object has no attribute 'configure'

@devmiku devmiku closed this as completed Jul 7, 2020
@devmiku
Copy link
Author

devmiku commented Jul 7, 2020

Nevermind, just found the VisJS Documentation which states that button visibility can be passed as option with filters as well:

var options = {
configure: {
enabled: true,
filter: 'nodes,edges',
container: undefined,
showButton: true
}
}

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

1 participant