From f065d6224f5fafd26e3456ffa223e0ae1d174cd2 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 26 Dec 2019 05:50:02 -0500 Subject: [PATCH] Fix sorting components that are not *quite* aligned in helper.py. --- helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper.py b/helper.py index ecc4bbf1..bb13a930 100755 --- a/helper.py +++ b/helper.py @@ -329,7 +329,7 @@ def panel_to_components(tree): components['widgets'].append(c) # Sort components - top_left_sort = lambda w: (w['cy'], w['cx']) + top_left_sort = lambda w: w['cy'] + 0.01 * w['cx'] components['params'] = sorted(components['params'], key=top_left_sort) components['inputs'] = sorted(components['inputs'], key=top_left_sort) components['outputs'] = sorted(components['outputs'], key=top_left_sort)