Get orientation using  instead of from innerHeight and innerWidth.