Fixed: Zooming, panel mode when zoomed
This commit is contained in:
parent
cbb776835b
commit
79c384af3a
2 changed files with 18 additions and 12 deletions
22
sahli.coffee
22
sahli.coffee
|
|
@ -65,8 +65,8 @@ class @Sahli
|
||||||
pdiv.append ptxt
|
pdiv.append ptxt
|
||||||
pdiv.append buf
|
pdiv.append buf
|
||||||
# this is going to be interesting when dealing with ansi files in UTF-8
|
# this is going to be interesting when dealing with ansi files in UTF-8
|
||||||
# or SHIFT-JIS etc - is it needed now?
|
# or SHIFT-JIS etc - is it needed now? no. it is not.
|
||||||
req.overrideMimeType 'text/plain; charset=ISO-8859-1'
|
# req.overrideMimeType 'text/plain; charset=ISO-8859-1'
|
||||||
req.onreadystatechange = ->
|
req.onreadystatechange = ->
|
||||||
if req.readyState == req.DONE
|
if req.readyState == req.DONE
|
||||||
if req.status == 200 or req.status == 0
|
if req.status == 200 or req.status == 0
|
||||||
|
|
@ -238,20 +238,23 @@ class @Sahli
|
||||||
$('canvas').width newwidth
|
$('canvas').width newwidth
|
||||||
else
|
else
|
||||||
if zoomee.width() != @origwidth
|
if zoomee.width() != @origwidth
|
||||||
zoomee.width @origwidthg
|
zoomee.width @origwidth
|
||||||
$('canvas').width '100%'
|
$('canvas').width '100%'
|
||||||
else
|
else
|
||||||
zoomee.width '100%'
|
zoomee.width '100%'
|
||||||
$('canvas').width '100%'
|
$('canvas').width '100%'
|
||||||
|
|
||||||
|
@infobar = ->
|
||||||
|
$('.infobox').toggle()
|
||||||
|
|
||||||
# create a panel of 'strips' so as to show a very long vertical piece on one
|
# create a panel of 'strips' so as to show a very long vertical piece on one
|
||||||
# big 'plate'
|
# big 'plate'
|
||||||
|
|
||||||
@panelmode = ->
|
@panelmode = ->
|
||||||
$('#panel').toggle()
|
$('#panel').toggle()
|
||||||
canvs = $('canvas')
|
canvs = $('canvas')
|
||||||
if $('.scrolly').width() == @origwidth
|
$('.scrolly').width @origwidth
|
||||||
$('.scrolly').width '100%'
|
if $('#panel').css('display') != 'none'
|
||||||
$('#panel').empty()
|
$('#panel').empty()
|
||||||
ww = window.innerWidth
|
ww = window.innerWidth
|
||||||
wh = window.innerHeight
|
wh = window.innerHeight
|
||||||
|
|
@ -291,14 +294,7 @@ class @Sahli
|
||||||
drawcol = drawcol + 1
|
drawcol = drawcol + 1
|
||||||
if ct < numpanels
|
if ct < numpanels
|
||||||
outer.append @createpanel(drawcol,newwidth - 6)
|
outer.append @createpanel(drawcol,newwidth - 6)
|
||||||
|
|
||||||
# console.log "ww: #{ww} wh: #{wh} numpanels: #{numpanels} x: #{x}"
|
|
||||||
# console.log "numcols: #{numcols} picdpercol: #{picdpercol}"
|
|
||||||
# console.log "psh: #{panelslotheight} pps: #{panelsperslot}"
|
|
||||||
# console.log "a*b: #{panelsperslot*(numcols-1)}"
|
|
||||||
|
|
||||||
else
|
else
|
||||||
$('.scrolly').width @origwidth
|
|
||||||
$('#outbox').show()
|
$('#outbox').show()
|
||||||
$('.scrolly').append pic for pic in canvs
|
$('.scrolly').append pic for pic in canvs
|
||||||
canvs.width @origwidth
|
canvs.width @origwidth
|
||||||
|
|
@ -337,6 +333,8 @@ class @Sahli
|
||||||
@changescrolldirection 1
|
@changescrolldirection 1
|
||||||
when @keycode 'c'
|
when @keycode 'c'
|
||||||
@panelmode(1)
|
@panelmode(1)
|
||||||
|
when @keycode 'i'
|
||||||
|
@infobar()
|
||||||
when @keycode '1'
|
when @keycode '1'
|
||||||
@changespeed 1
|
@changespeed 1
|
||||||
when @keycode '2'
|
when @keycode '2'
|
||||||
|
|
|
||||||
8
todo.txt
8
todo.txt
|
|
@ -4,3 +4,11 @@
|
||||||
(D) THUMBNAILS - for returning to partymeister @PARTYMEISTER
|
(D) THUMBNAILS - for returning to partymeister @PARTYMEISTER
|
||||||
(D) implement package import from partymeister @PARTYMEISTER
|
(D) implement package import from partymeister @PARTYMEISTER
|
||||||
(D) hook for progress @progress @PARTYMEISTER
|
(D) hook for progress @progress @PARTYMEISTER
|
||||||
|
(A) info page
|
||||||
|
(A) center panel mode vertically
|
||||||
|
(A) help on top of panel mode (always top)
|
||||||
|
(C) SAHLI ansi & ascii for load page
|
||||||
|
(C) redo load page (not popup, info)
|
||||||
|
(B) Preload
|
||||||
|
(A) center ascii if smaller than 1 page (ansi too?)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue