Skip to content

Commit 4822f15

Browse files
author
Jon M. Mease
committed
Fix FigureWidget frame validation
1 parent 5489a89 commit 4822f15

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

plotly/basewidget.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,6 @@ def __init__(self,
118118
layout=None,
119119
frames=None):
120120

121-
# Validate Frames
122-
# ---------------
123-
# Frames are not supported by figure widget
124-
if frames:
125-
BaseFigureWidget._display_frames_error()
126-
self._frame_objs = None
127-
128121
# Call superclass constructors
129122
# ----------------------------
130123
# Note: We rename layout to layout_plotly because to deconflict it
@@ -133,6 +126,13 @@ def __init__(self,
133126
super().__init__(data=data,
134127
layout_plotly=layout)
135128

129+
# Validate Frames
130+
# ---------------
131+
# Frames are not supported by figure widget
132+
if self._frame_objs:
133+
BaseFigureWidget._display_frames_error()
134+
self._frame_objs = None
135+
136136
# Message States
137137
# --------------
138138
# ### Layout ###
@@ -930,8 +930,8 @@ def _display_frames_error():
930930
ValueError
931931
always
932932
"""
933-
msg = """\
934-
Frames are not supported by the plotly.graph_objs.FigureWidget class.\n"
933+
msg = """
934+
Frames are not supported by the plotly.graph_objs.FigureWidget class.
935935
Note: Frames are supported by the plotly.graph_objs.Figure class"""
936936
raise ValueError(msg)
937937

0 commit comments

Comments
 (0)