##// END OF EJS Templates
Remove view_name from display
Jonathan Frederic -
Show More
@@ -60,7 +60,6 b' class Widget(LoggingConfigurable):'
60 # Private/protected declarations
60 # Private/protected declarations
61 # todo: change this to a context manager
61 # todo: change this to a context manager
62 _property_lock = (None, None) # Last updated (key, value) from the front-end. Prevents echo.
62 _property_lock = (None, None) # Last updated (key, value) from the front-end. Prevents echo.
63 _displayed = False
64 _comm = Instance('IPython.kernel.comm.Comm')
63 _comm = Instance('IPython.kernel.comm.Comm')
65
64
66 def __init__(self, **kwargs):
65 def __init__(self, **kwargs):
@@ -271,17 +270,11 b' class Widget(LoggingConfigurable):'
271 # Support methods
270 # Support methods
272 def _repr_widget_(self, **kwargs):
271 def _repr_widget_(self, **kwargs):
273 """Function that is called when `IPython.display.display` is called on
272 """Function that is called when `IPython.display.display` is called on
274 the widget.
273 the widget."""
275
276 Parameters
277 ----------
278 view_name: unicode (optional)
279 View to display in the frontend. Overrides view_name."""
280
274
281 # Show view. By sending a display message, the comm is opened and the
275 # Show view. By sending a display message, the comm is opened and the
282 # initial state is sent.
276 # initial state is sent.
283 self._send({"method": "display", "view_name": view_name})
277 self._send({"method": "display"})
284 self._displayed = True
285 self._handle_displayed(**kwargs)
278 self._handle_displayed(**kwargs)
286
279
287
280
General Comments 0
You need to be logged in to leave comments. Login now