Skip to content

Commit

Permalink
Update widget.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm authored Sep 5, 2023
1 parent 1a92189 commit d3e0525
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions nglview/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,15 @@ def __init__(self,
structure=None,
representations=None,
parameters=None,
gui=False,
theme='default',
default=False,
**kwargs):
super().__init__(**kwargs)

self._gui = None
self._init_gui = kwargs.pop('gui', False)
self._theme = kwargs.pop('theme', 'default')
self._init_gui = gui
self._theme = theme
self._widget_image = Image()
self._widget_image.width = 900.
self._image_array = []
Expand Down Expand Up @@ -224,8 +227,8 @@ def __init__(self,
# initial representations will be set.
kwargs['default_representation'] = False
else:
if 'default' in kwargs:
kwargs['default_representation'] = kwargs['default']
if default:
kwargs['default_representation'] = default

autoview = 'center' not in kwargs or ('center' in kwargs
and kwargs.pop('center'))
Expand Down

0 comments on commit d3e0525

Please sign in to comment.