Show More
@@ -3,10 +3,11 b'' | |||
|
3 | 3 | |
|
4 | 4 | define(["widgets/js/manager", |
|
5 | 5 | "underscore", |
|
6 |
"backbone", |
|
|
7 |
"jquery", |
|
|
6 | "backbone", | |
|
7 | "jquery", | |
|
8 | "base/js/utils", | |
|
8 | 9 | "base/js/namespace", |
|
9 | ], function(widgetmanager, _, Backbone, $, IPython){ | |
|
10 | ], function(widgetmanager, _, Backbone, $, utils, IPython){ | |
|
10 | 11 | |
|
11 | 12 | var WidgetModel = Backbone.Model.extend({ |
|
12 | 13 | constructor: function (widget_manager, model_id, comm) { |
@@ -259,7 +260,7 b' define(["widgets/js/manager",' | |||
|
259 | 260 | _.each(value, function(sub_value, key) { |
|
260 | 261 | unpacked[key] = that._unpack_models(sub_value) |
|
261 | 262 | }); |
|
262 | return util.resolve_dict(unpacked); | |
|
263 | return utils.resolve_dict(unpacked); | |
|
263 | 264 | } else if (typeof value === 'string' && value.slice(0,10) === "IPY_MODEL_") { |
|
264 | 265 | // get_model returns a promise already |
|
265 | 266 | return this.widget_manager.get_model(value.slice(10, value.length)); |
@@ -292,7 +293,7 b' define(["widgets/js/manager",' | |||
|
292 | 293 | this.options = parameters.options; |
|
293 | 294 | this.child_model_views = {}; |
|
294 | 295 | this.child_views = {}; |
|
295 |
this.id = this.id || |
|
|
296 | this.id = this.id || utils.uuid(); | |
|
296 | 297 | this.model.views[this.id] = this; |
|
297 | 298 | this.on('displayed', function() { |
|
298 | 299 | this.is_displayed = true; |
General Comments 0
You need to be logged in to leave comments.
Login now