Just starting out? Need help? Post your questions and find answers here.
poshu
Posts: 96 Joined: Mon Feb 24, 2014 11:46 pm
Post
by poshu » Tue May 08, 2018 4:32 am
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 :
vertical, unreadable :
Any way to fix that?
poshu
Posts: 96 Joined: Mon Feb 24, 2014 11:46 pm
Post
by poshu » Tue May 08, 2018 5:45 am
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 :