Centering was b0rked.
This commit is contained in:
parent
4d42275d4c
commit
8f689cf558
1 changed files with 3 additions and 3 deletions
6
sahli.js
6
sahli.js
|
|
@ -77,9 +77,7 @@ var Sahli = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loadplain = function (picdata, inserthere) {
|
this.loadplain = function (picdata, inserthere) {
|
||||||
// var ref = this;
|
|
||||||
var pdiv = $('<div>');
|
var pdiv = $('<div>');
|
||||||
// var canv = document.createElement('canvas');
|
|
||||||
var req = new XMLHttpRequest();
|
var req = new XMLHttpRequest();
|
||||||
var fname = this.location + '/' + picdata.file;
|
var fname = this.location + '/' + picdata.file;
|
||||||
var ptxt = $('<pre></pre>');
|
var ptxt = $('<pre></pre>');
|
||||||
|
|
@ -124,7 +122,7 @@ var Sahli = function () {
|
||||||
this.origwidth = canv.width;
|
this.origwidth = canv.width;
|
||||||
this.origheight = canv.height;
|
this.origheight = canv.height;
|
||||||
this.SAUCE = SAUCE;
|
this.SAUCE = SAUCE;
|
||||||
}, {"font": "80x25", "bits": "8", "columns": 80, "thumbnail": 0});
|
}, {"font": "80x25", "bits": "8", "columns": 160, "thumbnail": 0});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loadhugeansi = function (picdata, inserthere) {
|
this.loadhugeansi = function (picdata, inserthere) {
|
||||||
|
|
@ -132,6 +130,7 @@ var Sahli = function () {
|
||||||
var pdiv = $('<div>');
|
var pdiv = $('<div>');
|
||||||
var calcheight = 0;
|
var calcheight = 0;
|
||||||
var canvwidth = 0;
|
var canvwidth = 0;
|
||||||
|
pdiv.css('display', 'inline-block');
|
||||||
AnsiLove.splitRender(fname, function (chunks, SAUCE) {
|
AnsiLove.splitRender(fname, function (chunks, SAUCE) {
|
||||||
chunks.forEach(function (canv) {
|
chunks.forEach(function (canv) {
|
||||||
canv.style.verticalAlign = "bottom";
|
canv.style.verticalAlign = "bottom";
|
||||||
|
|
@ -143,6 +142,7 @@ var Sahli = function () {
|
||||||
this.SAUCE = SAUCE;
|
this.SAUCE = SAUCE;
|
||||||
this.origwidth = canvwidth;
|
this.origwidth = canvwidth;
|
||||||
this.origheight = calcheight;
|
this.origheight = calcheight;
|
||||||
|
pdiv.width(canvwidth);
|
||||||
}, 30, {"bits": "8"});
|
}, 30, {"bits": "8"});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue