##// END OF EJS Templates
append functions are not prototype methods
MinRK -
Show More
@@ -514,7 +514,7 b' var IPython = (function (IPython) {'
514 };
514 };
515
515
516
516
517 OutputArea.prototype.append_html = function (html, md, element) {
517 var append_html = function (html, md, element) {
518 var type = 'text/html';
518 var type = 'text/html';
519 var toinsert = this.create_output_subarea(md, "output_html rendered_html", type);
519 var toinsert = this.create_output_subarea(md, "output_html rendered_html", type);
520 IPython.keyboard_manager.register_events(toinsert);
520 IPython.keyboard_manager.register_events(toinsert);
@@ -524,7 +524,7 b' var IPython = (function (IPython) {'
524 };
524 };
525
525
526
526
527 OutputArea.prototype.append_javascript = function (js, md, element) {
527 var append_javascript = function (js, md, element) {
528 // We just eval the JS code, element appears in the local scope.
528 // We just eval the JS code, element appears in the local scope.
529 var type = 'application/javascript';
529 var type = 'application/javascript';
530 var toinsert = this.create_output_subarea(md, "output_javascript", type);
530 var toinsert = this.create_output_subarea(md, "output_javascript", type);
@@ -545,7 +545,7 b' var IPython = (function (IPython) {'
545 };
545 };
546
546
547
547
548 OutputArea.prototype.append_text = function (data, md, element) {
548 var append_text = function (data, md, element) {
549 var type = 'text/plain';
549 var type = 'text/plain';
550 var toinsert = this.create_output_subarea(md, "output_text", type);
550 var toinsert = this.create_output_subarea(md, "output_text", type);
551 // escape ANSI & HTML specials in plaintext:
551 // escape ANSI & HTML specials in plaintext:
@@ -560,7 +560,7 b' var IPython = (function (IPython) {'
560 };
560 };
561
561
562
562
563 OutputArea.prototype.append_svg = function (svg, md, element) {
563 var append_svg = function (svg, md, element) {
564 var type = 'image/svg+xml';
564 var type = 'image/svg+xml';
565 var toinsert = this.create_output_subarea(md, "output_svg", type);
565 var toinsert = this.create_output_subarea(md, "output_svg", type);
566 toinsert.append(svg);
566 toinsert.append(svg);
@@ -601,7 +601,7 b' var IPython = (function (IPython) {'
601 if (width !== undefined) img.attr('width', width);
601 if (width !== undefined) img.attr('width', width);
602 };
602 };
603
603
604 OutputArea.prototype.append_png = function (png, md, element) {
604 var append_png = function (png, md, element) {
605 var type = 'image/png';
605 var type = 'image/png';
606 var toinsert = this.create_output_subarea(md, "output_png", type);
606 var toinsert = this.create_output_subarea(md, "output_png", type);
607 var img = $("<img/>").attr('src','data:image/png;base64,'+png);
607 var img = $("<img/>").attr('src','data:image/png;base64,'+png);
@@ -613,7 +613,7 b' var IPython = (function (IPython) {'
613 };
613 };
614
614
615
615
616 OutputArea.prototype.append_jpeg = function (jpeg, md, element) {
616 var append_jpeg = function (jpeg, md, element) {
617 var type = 'image/jpeg';
617 var type = 'image/jpeg';
618 var toinsert = this.create_output_subarea(md, "output_jpeg", type);
618 var toinsert = this.create_output_subarea(md, "output_jpeg", type);
619 var img = $("<img/>").attr('src','data:image/jpeg;base64,'+jpeg);
619 var img = $("<img/>").attr('src','data:image/jpeg;base64,'+jpeg);
@@ -625,7 +625,7 b' var IPython = (function (IPython) {'
625 };
625 };
626
626
627
627
628 OutputArea.prototype.append_pdf = function (pdf, md, element) {
628 var append_pdf = function (pdf, md, element) {
629 var type = 'application/pdf';
629 var type = 'application/pdf';
630 var toinsert = this.create_output_subarea(md, "output_pdf", type);
630 var toinsert = this.create_output_subarea(md, "output_pdf", type);
631 var a = $('<a/>').attr('href', 'data:application/pdf;base64,'+pdf);
631 var a = $('<a/>').attr('href', 'data:application/pdf;base64,'+pdf);
@@ -636,7 +636,7 b' var IPython = (function (IPython) {'
636 return toinsert;
636 return toinsert;
637 }
637 }
638
638
639 OutputArea.prototype.append_latex = function (latex, md, element) {
639 var append_latex = function (latex, md, element) {
640 // This method cannot do the typesetting because the latex first has to
640 // This method cannot do the typesetting because the latex first has to
641 // be on the page.
641 // be on the page.
642 var type = 'text/latex';
642 var type = 'text/latex';
@@ -851,14 +851,14 b' var IPython = (function (IPython) {'
851 ];
851 ];
852
852
853 OutputArea.append_map = {
853 OutputArea.append_map = {
854 "text/plain" : OutputArea.prototype.append_text,
854 "text/plain" : append_text,
855 "text/html" : OutputArea.prototype.append_html,
855 "text/html" : append_html,
856 "image/svg+xml" : OutputArea.prototype.append_svg,
856 "image/svg+xml" : append_svg,
857 "image/png" : OutputArea.prototype.append_png,
857 "image/png" : append_png,
858 "image/jpeg" : OutputArea.prototype.append_jpeg,
858 "image/jpeg" : append_jpeg,
859 "text/latex" : OutputArea.prototype.append_latex,
859 "text/latex" : append_latex,
860 "application/javascript" : OutputArea.prototype.append_javascript,
860 "application/javascript" : append_javascript,
861 "application/pdf" : OutputArea.prototype.append_pdf
861 "application/pdf" : append_pdf
862 };
862 };
863
863
864 IPython.OutputArea = OutputArea;
864 IPython.OutputArea = OutputArea;
General Comments 0
You need to be logged in to leave comments. Login now