AllskyTeam / allsky-website

Web interface displaying an image from an allsky camera.
54 stars 42 forks source link

Constellation overlay issues on mobile #139

Closed Mr-Groch closed 11 months ago

Mr-Groch commented 1 year ago

Hi, contellation overlay has 2 bugs on mobile:

  1. It can be rotated by touch and drag ("mouse": false, "keyboard": false in config - on dekstop it can't be rotated)
  2. It is not properly diisplayed on mobile, on desktop: image On mobile: image
EricClaeys commented 1 year ago

Interesting. I never tried rotating on a mobile when "mouse" was false. Neither of these issues will likely be fixed anytime soon, unless we can find someone with very good javascript experience. I have spent countless hours trying to get the overlay to resize properly on smaller devices but have never gotten it to work. It's better but still needs a javascript expert.

By any chance are you an expert in javascript?

Mr-Groch commented 1 year ago

No, I'm not good in js... I'm preferring backend stuff :)

I've just found how to disable rotation of constellation by touch and drag. In virtualsky/virtualsky.js, line 1616 in }).on('touchmove',{sky:this},function(e){: if(s.dragging && s.mouse){ (was if(s.dragging){)

No idea about constellation overlay algning on mobile...

EricClaeys commented 11 months ago

@Mr-Groch Thanks much. I added this fix to the next major release.

Mr-Groch commented 11 months ago

Hi, I've found another workaround for misaligned constellation overlay on mobile

Changing in index.php:

<meta name="viewport" content="width=device-width, initial-scale=1">

To:

<meta name="viewport" content="width=1024">

Will make to render on mobile devices properly - small but without issues - it can be easily zoomed with pan & zoom

EricClaeys commented 11 months ago

How well does this work with tablets and PCs?

Mr-Groch commented 11 months ago

I've tested on my Xiaomi Redmi Note 11 and PC with FHD screen - on PC no noticeable change (screen width is bigger that declared viewport), on mobile it is better as mentioned earlier

Also tested on Chrome dev tools:

Samsung Galaxy S8+: image

IPad Air: image

Nest Hub: image

Surface 7 Pro: image

Alex-developer commented 11 months ago

@EricClaeys I'll add it to my list :-)

Could do with a little break from the new UI so will take a look at the weekend