ChatTheatre / SkotOS

Open Source version of the SkotOS narrative prose library, using the DGD driver.
https://www.ChatTheatre.com
Other
24 stars 6 forks source link

DoResize() function in skoot/usr/Theatre/data/www/Art.sam has hard-coded values. #117

Open AnthonyHJ opened 2 months ago

AnthonyHJ commented 2 months ago

Current version:

function DoResize() {
     var winOffsetWidth = document.Art.width + 12;
     var winOffsetHeight = document.Art.height + 31;
     window.resizeTo(winOffsetWidth,winOffsetHeight);
 } 

A possible better version of the function would be something like:

function DoResize() {
    var winOffsetWidth = (2 * document.Art.width) - window.innerWidth;
    var winOffsetHeight = (2 * document.Art.height) - window.innerHeight;
    window.resizeTo(winOffsetWidth,winOffsetHeight);
 }

I think that does what it is meant to do.

ChristopherA commented 2 months ago

We don’t have an active maintainer at this point.

Do you want to try this fix out and submit a PR?

I’d also be interested in understanding your interest in using SkotOS is and if I can help?

AnthonyHJ commented 2 months ago

I'm a web-developer, so my involvement is only tangential. Someone asked me to work out why Orchil was not able to resize windows correctly in Opera and I took a look into it as a favour; the issue turned out to be in SkotOS rather than Orchil, so I thought I'd at least make sure it was documented.