Show More
@@ -23,7 +23,7 b'' | |||
|
23 | 23 | // elsewhere. |
|
24 | 24 | define(["underscore", |
|
25 | 25 | "backbone", |
|
26 |
], function ( |
|
|
26 | ], function (_, Backbone) { | |
|
27 | 27 | |
|
28 | 28 | //-------------------------------------------------------------------- |
|
29 | 29 | // WidgetManager class |
@@ -17,7 +17,7 b'' | |||
|
17 | 17 | define(["notebook/js/widgetmanager", |
|
18 | 18 | "underscore", |
|
19 | 19 | "backbone"], |
|
20 |
function(WidgetManager, |
|
|
20 | function(WidgetManager, _, Backbone){ | |
|
21 | 21 | |
|
22 | 22 | var WidgetModel = Backbone.Model.extend({ |
|
23 | 23 | constructor: function (widget_manager, model_id, comm) { |
@@ -79,7 +79,7 b' class Widget(LoggingConfigurable):' | |||
|
79 | 79 | #------------------------------------------------------------------------- |
|
80 | 80 | # Traits |
|
81 | 81 | #------------------------------------------------------------------------- |
|
82 | model_name = Unicode('WidgetModel', help="""Name of the backbone model | |
|
82 | _model_name = Unicode('WidgetModel', help="""Name of the backbone model | |
|
83 | 83 | registered in the front-end to create and sync this widget with.""") |
|
84 | 84 | _view_name = Unicode(help="""Default view registered in the front-end |
|
85 | 85 | to use to represent the widget.""", sync=True) |
@@ -121,7 +121,7 b' class Widget(LoggingConfigurable):' | |||
|
121 | 121 | If a Comm doesn't exist yet, a Comm will be created automagically.""" |
|
122 | 122 | if self._comm is None: |
|
123 | 123 | # Create a comm. |
|
124 | self._comm = Comm(target_name=self.model_name) | |
|
124 | self._comm = Comm(target_name=self._model_name) | |
|
125 | 125 | self._comm.on_msg(self._handle_msg) |
|
126 | 126 | self._comm.on_close(self._close) |
|
127 | 127 | Widget.widgets[self.model_id] = self |
General Comments 0
You need to be logged in to leave comments.
Login now