')
+ pdiv.addClass 'scrolly'
+ pdiv.width picdata.width
+ pdiv.css 'display', 'inline-block'
+ pimg = $('
')
+ pdiv.append pimg
+ inserthere.after pdiv
+ $('body').scrollTop 0
+ @origwidth = picdata.width
+
@loadhugeansi = (picdata, inserthere) ->
fname = @location + '/' + picdata.file
pdiv = $('
')
@@ -97,7 +111,7 @@ class @Sahli
@origwidth = canvwidth
@origheight = calcheight
pdiv.width canvwidth
- ), 30, 'bits': '8'
+ ), 30, {'bits': '8', "font": picdata.font}
@loadavatar = (picdata, inserthere) ->
console.log 'avatar', picdata, inserthere
@@ -237,7 +251,7 @@ class @Sahli
zoomee.width newwidth
$('canvas').width newwidth
else
- if zoomee.width() != @origwidth
+ if ''+zoomee.width() != ''+@origwidth
zoomee.width @origwidth
$('canvas').width '100%'
else
diff --git a/sahli.css b/sahli.css
index b0a213a..7e13eb6 100644
--- a/sahli.css
+++ b/sahli.css
@@ -35,6 +35,7 @@ body {
h6 {
color: transparent;
background-color: transparent;
+ display: none;
}
.help {
diff --git a/sahli.js b/sahli.js
index a80b989..7c81f8d 100644
--- a/sahli.js
+++ b/sahli.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.11.0
+// Generated by CoffeeScript 1.9.3
/*
.___________________________________, ___
@@ -40,6 +40,8 @@ l__________/__________|___|______l__________j_____j
return this.loadhugeansi(picdata, inserthere);
case 'tundra':
return this.loadhugeansi(picdata, inserthere);
+ case 'image':
+ return this.loadpicture(picdata, inserthere);
default:
return this.loadplain(picdata, inserthere);
}
@@ -87,6 +89,20 @@ l__________/__________|___|______l__________j_____j
return req.send(null);
};
+ Sahli.loadpicture = function(picdata, inserthere) {
+ var fname, pdiv, pimg;
+ fname = this.location + '/' + picdata.file;
+ pdiv = $('
');
+ pdiv.addClass('scrolly');
+ pdiv.width(picdata.width);
+ pdiv.css('display', 'inline-block');
+ pimg = $('

');
+ pdiv.append(pimg);
+ inserthere.after(pdiv);
+ $('body').scrollTop(0);
+ return this.origwidth = picdata.width;
+ };
+
Sahli.loadhugeansi = function(picdata, inserthere) {
var calcheight, canvwidth, fname, pdiv;
fname = this.location + '/' + picdata.file;
@@ -111,7 +127,8 @@ l__________/__________|___|______l__________j_____j
return pdiv.width(canvwidth);
};
})(this)), 30, {
- 'bits': '8'
+ 'bits': '8',
+ "font": picdata.font
});
};
@@ -280,7 +297,7 @@ l__________/__________|___|______l__________j_____j
zoomee.width(newwidth);
return $('canvas').width(newwidth);
} else {
- if (zoomee.width() !== this.origwidth) {
+ if ('' + zoomee.width() !== '' + this.origwidth) {
zoomee.width(this.origwidth);
return $('canvas').width('100%');
} else {