From d3e05250cc902aa36e81db6339b59ad29528dea7 Mon Sep 17 00:00:00 2001 From: Hai Nguyen Date: Tue, 5 Sep 2023 14:55:07 -0400 Subject: [PATCH] Update widget.py --- nglview/widget.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nglview/widget.py b/nglview/widget.py index 3edfc032..afa8baa2 100644 --- a/nglview/widget.py +++ b/nglview/widget.py @@ -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 = [] @@ -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'))