mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
Merge pull request #1952 from gnestor/display_order-index
Set mimerender index in `OutputArea.display_order`
This commit is contained in:
commit
f0050e9bf8
@ -1072,11 +1072,15 @@ define([
|
||||
[MIME_PDF] : append_pdf
|
||||
};
|
||||
|
||||
OutputArea.prototype.register_mime_type = function (mimetype, append, safe) {
|
||||
OutputArea.prototype.mime_types = function () {
|
||||
return OutputArea.display_order;
|
||||
};
|
||||
|
||||
OutputArea.prototype.register_mime_type = function (mimetype, append, options) {
|
||||
if (mimetype && typeof(append) === 'function') {
|
||||
OutputArea.output_types.push(mimetype);
|
||||
if (safe) OutputArea.safe_outputs[mimetype] = true;
|
||||
OutputArea.display_order.unshift(mimetype);
|
||||
if (options.safe) OutputArea.safe_outputs[mimetype] = true;
|
||||
OutputArea.display_order.splice(options.index || 0, 0, mimetype);
|
||||
OutputArea.append_map[mimetype] = append;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user