Skip to content

Commit 429eeb9

Browse files
committed
Add comment and revert changes to variable
1 parent 215017f commit 429eeb9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: packages/python/plotly/js/widget.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ export class FigureView {
968968
if (_.isNil(layout) || _.isNil(layout.width)) {
969969
// @ts-ignore
970970
Plotly.Plots.resize(that.el).then(function () {
971-
var layout_edit_id = that.model.get("_last_widget_layout_edit_id");
971+
var layout_edit_id = that.model.get("_last_layout_edit_id");
972972
that._sendLayoutDelta(layout_edit_id);
973973
});
974974
}

Diff for: packages/python/plotly/plotly/basewidget.py

+4
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,10 @@ def _repr_mimebundle_(self, include=None, exclude=None, validate=True, **kwargs)
730730
Return mimebundle corresponding to default renderer.
731731
"""
732732
display_jupyter_version_warnings()
733+
734+
# Widget layout and data need to be set here in case there are
735+
# changes made to the figure after the widget is created but before
736+
# the cell is run.
733737
self._widget_layout = deepcopy(self._layout_obj._props)
734738
self._widget_data = deepcopy(self._data)
735739
return {

0 commit comments

Comments
 (0)