##// END OF EJS Templates
Bug fixes
Jonathan Frederic -
Show More
@@ -286,6 +286,7 function(WidgetManager, _, Backbone){
286 286 this.child_model_views = {};
287 287 this.child_views = {};
288 288 this.model.views.push(this);
289 this.id = this.id || IPython.utils.uuid();
289 290 },
290 291
291 292 update: function(){
@@ -304,6 +305,7 function(WidgetManager, _, Backbone){
304 305 // it would be great to have the widget manager add the cell metadata
305 306 // to the subview without having to add it here.
306 307 var child_view = this.model.widget_manager.create_view(child_model, options || {}, this);
308 child_view.id = child_view.id || IPython.utils.uuid();
307 309
308 310 // Associate the view id with the model id.
309 311 if (this.child_model_views[child_model.id] === undefined) {
@@ -325,7 +327,7 function(WidgetManager, _, Backbone){
325 327 var view_id = view_ids[0];
326 328 var view = this.child_views[view_id];
327 329 delete this.child_views[view_id];
328 delete view_ids[0];
330 view_ids.splice(0,1);
329 331 child_model.views.pop(view);
330 332
331 333 // Remove the view list specific to this model if it is empty.
@@ -363,7 +365,6 function(WidgetManager, _, Backbone){
363 365
364 366 // Remove the non-matching items from the old list.
365 367 for (var j = i; j < old_list.length; j++) {
366 console.log(j, old_list.length, old_list[j]);
367 368 removed_callback(old_list[j]);
368 369 }
369 370
@@ -55,6 +55,7 define(["widgets/js/widget"], function(WidgetManager){
55 55 // one-to-one mapping with the corrosponding keys of the model.
56 56 var jquery_slider_keys = ['step', 'max', 'min', 'disabled'];
57 57 var that = this;
58 that.$slider.slider({});
58 59 _.each(jquery_slider_keys, function(key, i) {
59 60 var model_value = that.model.get(key);
60 61 if (model_value !== undefined) {
General Comments 0
You need to be logged in to leave comments. Login now