flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Added isMobile()
Date Sun, 03 Sep 2017 07:37:25 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop a2438456e -> 2609e6109


Added isMobile()


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2609e610
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2609e610
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2609e610

Branch: refs/heads/develop
Commit: 2609e61091d3b77d665752a57865278aa625f79d
Parents: a243845
Author: Harbs <harbs@in-tools.com>
Authored: Sun Sep 3 10:37:21 2017 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Sun Sep 3 10:37:21 2017 +0300

----------------------------------------------------------------------
 .../Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2609e610/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as
index c902ac7..59f4052 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as
@@ -78,7 +78,7 @@ package org.apache.flex.utils
 
         private var _formFactor:String;
         /**
-         * The form factor of the device. Pne of: "Mobile", "Tablet", "TV", "iPhone", "iPad",
"iPod" or "Desktop".
+         * The form factor of the device. One of: "Mobile", "Tablet", "TV", "iPhone", "iPad",
"iPod" or "Desktop".
          */
         public function get formFactor():String{
             return _formFactor;
@@ -87,6 +87,10 @@ package org.apache.flex.utils
         {
             return OSUtils.getOS();
         }
+        public function isMobile():Boolean
+        {
+            return formFactor != "Desktop" && formFactor != "TV";
+        }
         private static var _current:BrowserInfo;
         public static function current():BrowserInfo
         {


Mime
View raw message