0

私はハイブリッドモバイルアプリケーションを構築しています。私は特定の画面だけのために向きをポートレートモードに制限する必要があります。ページ全体が単一のhtmlです。 divにポートレートやランドスケープを設定することは可能ですか?そのような事件を処理する可能性があるかどうかを知りたい。Javascriptのオリエンテーションを変更する

答えて

0

あなたはプログラムでアプリの向きを変更するcordova-plugin-screen-orientationを使用(またはロック/アンロック)することができます

// set to either landscape 
screen.lockOrientation('landscape'); 

// allow user rotate 
screen.unlockOrientation(); 

// access current orientation 
console.log('Orientation is ' + screen.orientation); 
関連する問題