Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e7c0ff

Browse filesBrowse files
authored
Merge pull request plotly#1671 from plotly/move_traces_message_order
Send the moveTraces message after the figure's data has been updated.
2 parents c576adf + bc48a18 commit 2e7c0ff
Copy full SHA for 2e7c0ff

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎packages/python/plotly/plotly/basedatatypes.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/basedatatypes.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,9 @@ def data(self, new_data):
642642
# ### Check whether a move is needed ###
643643
if not all([i1 == i2 for i1, i2 in zip(new_inds, current_inds)]):
644644

645-
# #### Update widget, if any ####
646-
self._send_moveTraces_msg(current_inds, new_inds)
645+
# #### Save off index lists for moveTraces message ####
646+
msg_current_inds = current_inds
647+
msg_new_inds = new_inds
647648

648649
# #### Reorder trace elements ####
649650
# We do so in-place so we don't trigger traitlet property
@@ -664,6 +665,9 @@ def data(self, new_data):
664665
for ni, trace_data in zip(new_inds, moving_traces_data):
665666
self._data.insert(ni, trace_data)
666667

668+
# #### Update widget, if any ####
669+
self._send_moveTraces_msg(msg_current_inds, msg_new_inds)
670+
667671
# ### Update data defaults ###
668672
# There is to front-end syncronization to worry about so this
669673
# operations doesn't need to be in-place

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.