##// END OF EJS Templates
Added changes discussed with @jasongrout
Jonathan Frederic -
Show More
@@ -179,7 +179,13 b' define(['
179 return Promise.resolve(view.render()).then(function() {return view;});
179 return Promise.resolve(view.render()).then(function() {return view;});
180 }).catch(utils.reject("Couldn't create a view for model id '" + String(model.id) + "'", true));
180 }).catch(utils.reject("Couldn't create a view for model id '" + String(model.id) + "'", true));
181 });
181 });
182 model.views[utils.uuid()] = model.state_change;
182 var id = utils.uuid();
183 model.views[id] = model.state_change;
184 model.state_change.then(function(view) {
185 view.on('remove', function() {
186 delete view.model.views[id];
187 }, this);
188 });
183 return model.state_change;
189 return model.state_change;
184 };
190 };
185
191
@@ -388,9 +388,6 b' define(["widgets/js/manager",'
388 this.on('displayed', function() {
388 this.on('displayed', function() {
389 this.is_displayed = true;
389 this.is_displayed = true;
390 }, this);
390 }, this);
391 this.on('remove', function() {
392 delete this.model.views[this.id];
393 }, this);
394 },
391 },
395
392
396 update: function(){
393 update: function(){
General Comments 0
You need to be logged in to leave comments. Login now