s/image_format/format

This commit is contained in:
Jonathan Frederic 2014-01-08 11:43:36 +00:00
parent b5f97c1227
commit c62b496b0e
2 changed files with 3 additions and 3 deletions

View File

@ -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');

View File

@ -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()