##// END OF EJS Templates
s/image_format/format
Jonathan Frederic -
Show More
@@ -31,7 +31,7 define(["notebook/js/widgets/widget"], function(widget_manager){
31 31 //
32 32 // Called when the model is changed. The model may have been
33 33 // changed by another view or by a state update from the back-end.
34 var image_src = 'data:image/' + this.model.get('image_format') + ';base64,' + this.model.get('_b64value');
34 var image_src = 'data:image/' + this.model.get('format') + ';base64,' + this.model.get('_b64value');
35 35 this.$el.attr('src', image_src);
36 36
37 37 var width = this.model.get('width');
@@ -27,8 +27,8 class ImageWidget(DOMWidget):
27 27 view_name = Unicode('ImageView')
28 28
29 29 # Define the custom state properties to sync with the front-end
30 keys = ['image_format', 'width', 'height', '_b64value'] + DOMWidget.keys
31 image_format = Unicode('png')
30 keys = ['format', 'width', 'height', '_b64value'] + DOMWidget.keys
31 format = Unicode('png')
32 32 width = Unicode()
33 33 height = Unicode()
34 34 _b64value = Unicode()
General Comments 0
You need to be logged in to leave comments. Login now