Revert "Added generic picture support"

This reverts commit 4f884d9cac.
This commit is contained in:
m0qui 2017-03-19 14:58:15 +01:00
parent 4f884d9cac
commit df6a50ad7b
4 changed files with 6 additions and 38 deletions

View file

@ -10,7 +10,7 @@
<script>
$(document).ready(function(){
sahli = new Sahli;
Sahli.requestsahlifile('2016uncoldschool.sahli')
Sahli.requestsahlifile('list.sahli')
})
</script>
<link rel="stylesheet" href="sahli.css" type="text/css" media="screen" />

View file

@ -39,8 +39,6 @@ class @Sahli
@loadhugeansi picdata, inserthere
when 'tundra'
@loadhugeansi picdata, inserthere
when 'image'
@loadpicture picdata, inserthere
else
@loadplain picdata, inserthere
@ -80,18 +78,6 @@ class @Sahli
req.open 'GET', fname, true
req.send null
@loadpicture = (picdata, inserthere) ->
fname = @location + '/' + picdata.file
pdiv = $('<div>')
pdiv.addClass 'scrolly'
pdiv.width picdata.width
pdiv.css 'display', 'inline-block'
pimg = $('<img src="' + fname + '" width="100%"/>')
pdiv.append pimg
inserthere.after pdiv
$('body').scrollTop 0
@origwidth = picdata.width
@loadhugeansi = (picdata, inserthere) ->
fname = @location + '/' + picdata.file
pdiv = $('<div>')
@ -111,7 +97,7 @@ class @Sahli
@origwidth = canvwidth
@origheight = calcheight
pdiv.width canvwidth
), 30, {'bits': '8', "font": picdata.font}
), 30, 'bits': '8'
@loadavatar = (picdata, inserthere) ->
console.log 'avatar', picdata, inserthere
@ -251,7 +237,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

View file

@ -35,7 +35,6 @@ body {
h6 {
color: transparent;
background-color: transparent;
display: none;
}
.help {

View file

@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.3
// Generated by CoffeeScript 1.11.0
/*
.___________________________________, ___
@ -40,8 +40,6 @@ 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);
}
@ -89,20 +87,6 @@ l__________/__________|___|______l__________j_____j
return req.send(null);
};
Sahli.loadpicture = function(picdata, inserthere) {
var fname, pdiv, pimg;
fname = this.location + '/' + picdata.file;
pdiv = $('<div>');
pdiv.addClass('scrolly');
pdiv.width(picdata.width);
pdiv.css('display', 'inline-block');
pimg = $('<img src="' + fname + '" width="100%"/>');
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;
@ -127,8 +111,7 @@ l__________/__________|___|______l__________j_____j
return pdiv.width(canvwidth);
};
})(this)), 30, {
'bits': '8',
"font": picdata.font
'bits': '8'
});
};
@ -297,7 +280,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 {