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 18b51c2

Browse filesBrowse files
committed
Send the moveTraces message after the figure's data has been updated.
This way, subclasses have access to the new figure state.
1 parent 65625d4 commit 18b51c2
Copy full SHA for 18b51c2

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

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

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/basedatatypes.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,6 @@ 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)
647-
648645
# #### Reorder trace elements ####
649646
# We do so in-place so we don't trigger traitlet property
650647
# serialization for the FigureWidget case
@@ -664,6 +661,9 @@ def data(self, new_data):
664661
for ni, trace_data in zip(new_inds, moving_traces_data):
665662
self._data.insert(ni, trace_data)
666663

664+
# #### Update widget, if any ####
665+
self._send_moveTraces_msg(current_inds, new_inds)
666+
667667
# ### Update data defaults ###
668668
# There is to front-end syncronization to worry about so this
669669
# 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.