From 8f689cf558f22c47baa6fb2eb60d063eadd5233e Mon Sep 17 00:00:00 2001 From: Iam Naughton Phier Date: Fri, 10 Oct 2014 18:38:06 +0300 Subject: [PATCH] Centering was b0rked. --- sahli.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sahli.js b/sahli.js index ec3e851..445dbdc 100644 --- a/sahli.js +++ b/sahli.js @@ -77,9 +77,7 @@ var Sahli = function () { }; this.loadplain = function (picdata, inserthere) { -// var ref = this; var pdiv = $('
'); -// var canv = document.createElement('canvas'); var req = new XMLHttpRequest(); var fname = this.location + '/' + picdata.file; var ptxt = $('
');
@@ -124,7 +122,7 @@ var Sahli = function () {
             this.origwidth = canv.width;
             this.origheight = canv.height;
             this.SAUCE = SAUCE;
-        }, {"font": "80x25", "bits": "8", "columns": 80, "thumbnail": 0});
+        }, {"font": "80x25", "bits": "8", "columns": 160, "thumbnail": 0});
     };
 
     this.loadhugeansi = function (picdata, inserthere) {
@@ -132,6 +130,7 @@ var Sahli = function () {
         var pdiv = $('
'); var calcheight = 0; var canvwidth = 0; + pdiv.css('display', 'inline-block'); AnsiLove.splitRender(fname, function (chunks, SAUCE) { chunks.forEach(function (canv) { canv.style.verticalAlign = "bottom"; @@ -143,6 +142,7 @@ var Sahli = function () { this.SAUCE = SAUCE; this.origwidth = canvwidth; this.origheight = calcheight; + pdiv.width(canvwidth); }, 30, {"bits": "8"}); };