##// END OF EJS Templates
display order in output area configurable
Matthias BUSSONNIER -
Show More
@@ -325,23 +325,20 b' var IPython = (function (IPython) {'
325 325 };
326 326 };
327 327
328 OutputArea.display_order = ['javascript','html','latex','svg','png','jpeg','text'];
328 329
329 330 OutputArea.prototype.append_mime_type = function (json, element, dynamic) {
330 if (json.javascript !== undefined && dynamic) {
331 this.append_javascript(json.javascript, element, dynamic);
332 } else if (json.html !== undefined) {
333 this.append_html(json.html, element);
334 } else if (json.latex !== undefined) {
335 this.append_latex(json.latex, element);
336 } else if (json.svg !== undefined) {
337 this.append_svg(json.svg, element);
338 } else if (json.png !== undefined) {
339 this.append_png(json.png, element);
340 } else if (json.jpeg !== undefined) {
341 this.append_jpeg(json.jpeg, element);
342 } else if (json.text !== undefined) {
343 this.append_text(json.text, element);
344 };
331 for(var type_i in OutputArea.display_order){
332 var type = OutputArea.display_order[type_i];
333 if(json[type] != undefined ){
334 if(type != 'javascript' && dynamic){
335 this['append_'+type](json[type],element)
336 } else {
337 this.append_javascript(json.javascript, element, dynamic);
338 }
339 return
340 }
341 }
345 342 };
346 343
347 344
General Comments 0
You need to be logged in to leave comments. Login now