Skip to content

Commit

Permalink
Merge pull request #51 from eric-wieser/tidy-branches
Browse files Browse the repository at this point in the history
Combine duplicate if branches
  • Loading branch information
eric-wieser authored Aug 17, 2020
2 parents 24063d3 + dd76bc9 commit 2e56893
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions pyganja/script_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,34 +241,12 @@ def isnotebook():
def draw(objects, color=Color.DEFAULT, sig=None, *,
browser_window=False, new_window=False, static=False, **kwargs):
kwargs = dict(sig=sig, default_color=color, default_static=static, **kwargs)
if JUPYTERAVAILABLE:
if isnotebook():
if not new_window:
render_notebook_script(objects, **kwargs)
else:
if CEFAVAILABLE:
if browser_window:
render_browser_script(objects, **kwargs)
else:
render_cef_script(objects, **kwargs)
else:
render_browser_script(objects, **kwargs)
else:
if CEFAVAILABLE:
if browser_window:
render_browser_script(objects, **kwargs)
else:
render_cef_script(objects, **kwargs)
else:
render_browser_script(objects, **kwargs)
if JUPYTERAVAILABLE and isnotebook() and not new_window:
render_notebook_script(objects, **kwargs)
elif CEFAVAILABLE and not browser_window:
render_cef_script(objects, **kwargs)
else:
if CEFAVAILABLE:
if browser_window:
render_browser_script(objects, **kwargs)
else:
render_cef_script(objects, **kwargs)
else:
render_browser_script(objects, **kwargs)
render_browser_script(objects, **kwargs)


def _to_scene_string(objects, default_color=Color.DEFAULT, default_static=False):
Expand Down

0 comments on commit 2e56893

Please sign in to comment.