Skip to content

Commit 3c0d337

Browse files
committed
sort all node generators to make HTML output consistent for py2 + py3
1 parent 8517f3f commit 3c0d337

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plotly/dashboard_objs/dashboard_objs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def __init__(self, content=None):
215215
def _compute_box_ids(self):
216216
box_ids_to_path = {}
217217
all_nodes = list(node_generator(self['layout']))
218-
218+
all_nodes.sort(key=lambda x: x[1])
219219
for node in all_nodes:
220220
if (node[1] != () and node[0]['type'] == 'box'
221221
and node[0]['boxType'] != 'empty'):
@@ -248,6 +248,7 @@ def _insert(self, box_or_container, path):
248248

249249
def _make_all_nodes_and_paths(self):
250250
all_nodes = list(node_generator(self['layout']))
251+
all_nodes.sort(key=lambda x: x[1])
251252

252253
# remove path 'second' as it's always an empty box
253254
all_paths = []

0 commit comments

Comments
 (0)