Skip to content

Commit 71f5e9b

Browse files
author
wjm41
committed
fixed unbound local error
1 parent 680404a commit 71f5e9b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

molplotly/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ def add_molecules(
246246
else:
247247
colors = {0: "black"}
248248

249+
if not svg_height:
250+
svg_height = svg_size
251+
if not svg_width:
252+
svg_width = svg_size
253+
249254
app = JupyterDash(__name__)
250255
if smiles_col is None and mol_col is None:
251256
raise ValueError("Either smiles_col or mol_col has to be specified!")
@@ -349,10 +354,6 @@ def display_hover(hoverData, value):
349354
df_row = df.iloc[num]
350355

351356
hoverbox_elements = []
352-
if not svg_height:
353-
svg_height = svg_size
354-
if not svg_width:
355-
svg_width = svg_size
356357

357358
if show_img:
358359
for col in chosen_smiles:

0 commit comments

Comments
 (0)