You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by to...@apache.org on 2016/05/23 13:42:12 UTC

[14/50] cordova-plugin-screen-orientation git commit: Completed adding WP8 support

Completed adding WP8 support


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/6c975278
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/6c975278
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/6c975278

Branch: refs/heads/master
Commit: 6c975278ea2693d621fb510850068d4c3d487fc1
Parents: 6ef264c
Author: EddyVerbruggen <ed...@gmail.com>
Authored: Wed May 13 20:17:14 2015 +0200
Committer: EddyVerbruggen <ed...@gmail.com>
Committed: Wed May 13 20:17:14 2015 +0200

----------------------------------------------------------------------
 plugin.xml                      |  2 +-
 src/wp/YoikScreenOrientation.cs | 12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/6c975278/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index dafa2f9..f2ef542 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -2,7 +2,7 @@
 <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
     xmlns:android="http://schemas.android.com/apk/res/android"
     id="net.yoik.cordova.plugins.screenorientation"
-    version="1.3.3">
+    version="1.3.4">
 
     <name>Screen Orientation</name>
     <description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS and BB10.</description>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/6c975278/src/wp/YoikScreenOrientation.cs
----------------------------------------------------------------------
diff --git a/src/wp/YoikScreenOrientation.cs b/src/wp/YoikScreenOrientation.cs
index 4663998..776ce8d 100644
--- a/src/wp/YoikScreenOrientation.cs
+++ b/src/wp/YoikScreenOrientation.cs
@@ -43,10 +43,15 @@ namespace WPCordovaClassLib.Cordova.Commands
     public class YoikScreenOrientation : BaseCommand
     {
         #region Static members
-
         private const string UNLOCKED = "unlocked";
+
         private const string PORTRAIT = "portrait";
+        private const string PORTRAIT_PRIMARY = "portrait-primary";
+        private const string PORTRAIT_SECONDARY = "portrait-secondary";
+
         private const string LANDSCAPE = "landscape";
+        private const string LANDSCAPE_PRIMARY = "landscape-primary";
+        private const string LANDSCAPE_SECONDARY = "landscape-secondary";
 
         #endregion
 
@@ -93,11 +98,12 @@ namespace WPCordovaClassLib.Cordova.Commands
                     if (TryCast(Application.Current.RootVisual, out frame) &&
                       TryCast(frame.Content, out page))
                     {
-                        if (orientation == PORTRAIT)
+                        if (orientation == PORTRAIT || orientation == PORTRAIT_PRIMARY || orientation == PORTRAIT_SECONDARY)
                         {
                             page.SupportedOrientations = SupportedPageOrientation.Portrait;
                         }
-                        else if (orientation == LANDSCAPE)
+
+                        else if (orientation == LANDSCAPE || orientation == LANDSCAPE_PRIMARY || orientation == LANDSCAPE_SECONDARY)
                         {
                             page.SupportedOrientations = SupportedPageOrientation.Landscape;
                         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org