From cbb776835b3670464107ca46d0301199b2bce495 Mon Sep 17 00:00:00 2001 From: Iam Naughton Phier Date: Wed, 25 Mar 2015 13:09:21 +0200 Subject: [PATCH] Fix: pageup/down/up/down on chromium. Firefox still works. --- done.txt | 8 ++++++++ sahli.coffee | 16 +++++++++++++++- todo.txt | 8 -------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/done.txt b/done.txt index 0562cb0..994cee0 100644 --- a/done.txt +++ b/done.txt @@ -28,3 +28,11 @@ x 2015-02-22 Fix Amiga mode rendering via sixteencolors lib @16colors x 2015-02-22 check below items for neccesity x 2015-02-22 load to array/picture, render from picture @16colors x 2015-02-22 speed up rendering more? @16colors +x 2015-03-25 BIN @OTHER +x 2015-03-25 IDF @OTHER +x 2015-03-25 Tundra @OTHER +x 2015-03-25 PCBOARD @OTHER +x 2015-03-25 Avatar @OTHER +x 2015-03-25 2015-02-22 ADF @OTHER +x 2015-03-25 XBIN @OTHER +x 2015-03-25 remove the SAUCE lines at bottom, return ANSI object for render @SAUCE diff --git a/sahli.coffee b/sahli.coffee index 77fa3b7..f4f0848 100644 --- a/sahli.coffee +++ b/sahli.coffee @@ -210,6 +210,13 @@ class @Sahli @scroll_direction = - @scroll_direction @setscroll() +# chromium wasn't working with up/down/pageup/pagedown, firefox was. This makes +# both work the same way. + + @moveline = (direction) -> + curpos = $('body').scrollTop() + $('body').scrollTop(curpos + (16*direction)) + @changescrolldirection = (direction) -> @scroll_direction = direction $('body').stop() @@ -297,7 +304,6 @@ class @Sahli canvs.width @origwidth $('body').scrollTop 0 - @createpanel = (i,amt) -> dcol = $("
#{i}
") dcol.width amt @@ -344,6 +350,14 @@ class @Sahli @scroll_speed = 4 when @keycode '5' @changespeed 5 + when 40 # down + @moveline 1 + when 38 # up + @moveline -1 + when 34 # pagedown + @moveline 40 + when 33 # pageup + @moveline -40 when @keycode 'h' $('.help').css {'left':'33%'} $('.help').toggle 'fast' diff --git a/todo.txt b/todo.txt index 95c5436..ad29191 100644 --- a/todo.txt +++ b/todo.txt @@ -1,14 +1,6 @@ -(B) 2015-02-22 ADF @OTHER (B) @EDITOR add more Amiga fonts. (B) @EDITOR redo filenames to load from list of files in directory (specfied in 'location') -(A) remove the SAUCE lines at bottom, return ANSI object for render @SAUCE -(A) XBIN @OTHER (C) Amiga ANSI @OTHER -(B) Avatar @OTHER -(B) BIN @OTHER -(B) IDF @OTHER -(B) PCBOARD @OTHER (D) THUMBNAILS - for returning to partymeister @PARTYMEISTER -(B) Tundra @OTHER (D) implement package import from partymeister @PARTYMEISTER (D) hook for progress @progress @PARTYMEISTER