From 8d175cfeff171783f3f8a90eb6d2005fc3e7f8db 2014-01-16 10:57:17 From: Jonathan Frederic Date: 2014-01-16 10:57:17 Subject: [PATCH] s/image_format/format --- diff --git a/IPython/html/static/notebook/js/widgets/widget_image.js b/IPython/html/static/notebook/js/widgets/widget_image.js index 03456d8..c4c7f7c 100644 --- a/IPython/html/static/notebook/js/widgets/widget_image.js +++ b/IPython/html/static/notebook/js/widgets/widget_image.js @@ -31,7 +31,7 @@ define(["notebook/js/widgets/widget"], function(widget_manager){ // // Called when the model is changed. The model may have been // changed by another view or by a state update from the back-end. - var image_src = 'data:image/' + this.model.get('image_format') + ';base64,' + this.model.get('_b64value'); + var image_src = 'data:image/' + this.model.get('format') + ';base64,' + this.model.get('_b64value'); this.$el.attr('src', image_src); var width = this.model.get('width'); diff --git a/IPython/html/widgets/widget_image.py b/IPython/html/widgets/widget_image.py index cb8d6a3..1ecdae6 100644 --- a/IPython/html/widgets/widget_image.py +++ b/IPython/html/widgets/widget_image.py @@ -27,8 +27,8 @@ class ImageWidget(DOMWidget): view_name = Unicode('ImageView') # Define the custom state properties to sync with the front-end - keys = ['image_format', 'width', 'height', '_b64value'] + DOMWidget.keys - image_format = Unicode('png') + keys = ['format', 'width', 'height', '_b64value'] + DOMWidget.keys + format = Unicode('png') width = Unicode() height = Unicode() _b64value = Unicode()