Skip to content

Commit

Permalink
Add separate statements for landscape option, fixes ionic-team#2039
Browse files Browse the repository at this point in the history
  • Loading branch information
codepip55 committed Feb 26, 2024
1 parent d5483ce commit a1f43db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ private int fromOrientationTypeToEnum(String orientationType) {
case "any":
return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
case "landscape":
return ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
case "landscape-primary":
return ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
case "landscape-secondary":
Expand Down
4 changes: 3 additions & 1 deletion screen-orientation/ios/Plugin/ScreenOrientation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public class ScreenOrientation: NSObject {
switch orientationType {
case "any":
return UIInterfaceOrientationMask.all
case "landscape", "landscape-primary":
case "landscape":
return UIInterfaceOrientationMask.landscape
case "landscape-primary":
return UIInterfaceOrientationMask.landscapeLeft
case "landscape-secondary":
return UIInterfaceOrientationMask.landscapeRight
Expand Down

0 comments on commit a1f43db

Please sign in to comment.