Page 1 of 1

portait mode on HDPI?

Posted: Tue May 08, 2018 4:32 am
by poshu
Hey!

on portrait mode phones, spiderbasic's gadget aren't being scaled properly; making them way too small and basically unusable.

Here is an example on a Chrome simulated iphone X :
horizontal, everything is fine :
Image

vertical, unreadable :
Image

Any way to fix that?

Re: portait mode on HDPI?

Posted: Tue May 08, 2018 5:45 am
by poshu
I tried to change the page scaling when the orientation changed... Not only does it messes with the touch input, but it doesn't scale right (might be my fault, I'm out of my comfort zone).

Code: Select all

Procedure Handler_Orientation(orientation)
	!document.body.style.transformOrigin = 'top left';
	If orientation = 90
		!document.body.style.transform = 'scale(1)';
	Else
		!document.body.style.transform = 'scale(' + window.devicePixelRatio + ')';
	EndIf
	
EndProcedure

!window.addEventListener("orientationchange", function() {
!	f_handler_orientation(Math.abs(screen.orientation.angle));
!});

Debug "somethin somethin'"
Quick demo of the result :
Image