cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Blotsky <dblot...@microsoft.com>
Subject How does orientation work, and what is shouldRotateToOrientation?
Date Thu, 07 Jan 2016 05:38:14 GMT
Hey folks,

I’ve had a bug forwarded my way where a Cordova app wouldn’t switch orientation on iOS
unless the following code was present:

function onDeviceReady() {
    ...
    window.shouldRotateToOrientation = function (degrees) {
        return true;
    }
    ...
};

Could someone please explain why it is needed? Is this in one of our plugins? And perhaps
also: what else/instead is needed to have a Cordova app properly support flipping of screen
orientation?

Kindly,
Dmitry
Mime
View raw message