##// END OF EJS Templates
Fix serialization of models from js -> kernel
Jason Grout -
Show More
@@ -30,6 +30,8 b' define(['
30 return Promise.resolve(value);
30 return Promise.resolve(value);
31 }
31 }
32 },
32 },
33 /* We don't need a serializer since models automatically serialize to their UUIDs */
34 /* courtesy of the model toJSON */
33 },
35 },
34 }
36 }
35 });
37 });
@@ -440,6 +440,14 b' define(["widgets/js/manager",'
440 }, this);
440 }, this);
441
441
442 },
442 },
443
444 toJSON: function(options) {
445 /**
446 * Serialize the model. See the types.js deserialization function
447 * and the kernel-side serializer/deserializer
448 */
449 return "IPY_MODEL_"+this.id;
450 }
443 });
451 });
444 widgetmanager.WidgetManager.register_widget_model('WidgetModel', WidgetModel);
452 widgetmanager.WidgetManager.register_widget_model('WidgetModel', WidgetModel);
445
453
General Comments 0
You need to be logged in to leave comments. Login now