From c62b496b0edc5c1a4b961fe666880be83773f870 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Wed, 8 Jan 2014 11:43:36 +0000 Subject: [PATCH] s/image_format/format --- IPython/html/static/notebook/js/widgets/widget_image.js | 2 +- IPython/html/widgets/widget_image.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IPython/html/static/notebook/js/widgets/widget_image.js b/IPython/html/static/notebook/js/widgets/widget_image.js index 03456d8f2..c4c7f7ce0 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 cb8d6a359..1ecdae6f0 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()