mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
s/image_format/format
This commit is contained in:
parent
b5f97c1227
commit
c62b496b0e
@ -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');
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user