portait mode on HDPI?

Just starting out? Need help? Post your questions and find answers here.
poshu
Posts: 96
Joined: Mon Feb 24, 2014 11:46 pm

portait mode on HDPI?

Post 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?
poshu
Posts: 96
Joined: Mon Feb 24, 2014 11:46 pm

Re: portait mode on HDPI?

Post 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
Post Reply