Scroll to the absolute bottom.

sirwacka
21 Nov 2016, 17:39

Hello fellow typists, I have stumbled onto a problem that searching the internet could not fix.
My problem: I need to scroll to the absolute bottom of the textadventure. (problem only occurs when changing rooms, because then a picture will be shown)

I put this in the Room Description:

Discription: Text

{img: image.jpg}
{once: sometext }
sometext

I did this because I have a map (grid). I want one picture per room. (static pictures won't work properly with grid)
So instead I put the image directly in the text.
This however, resulted in the page not scrolling down enough to see all the text IF any.
I am absolutely positive that the image is not seen as its size, rather as one line, resulting in too little scrolling down.

I am fine with a ClearScreen IF it wouldn't instantly switch pages. (i like some animation, like scrolling)
I am also fine with something that would force the adventure to scroll entirely down when a new room is entered.

If anyone has a clue how to fix this problem, I'd love to hear suggestions.
Thanks in advance.

~sirwacka


Pertex
22 Nov 2016, 07:22

Try to call

JS.scrollToEnd()

in the "after entering the room" script


sirwacka
01 Dec 2016, 12:46

Sorry for the late reply.
I put the JS.scrollToEnd() into the "Script when entering a room" tab from 'game'.
What this does is:
-It still does not scroll to the absolute bottom (it scrolls to, what it thinks is the bottom, because of the picture problem I mentioned)
-it removes the scrolling animation.

Thanks for the idea, sadly it did not work.