You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2020/01/20 09:08:57 UTC

[royale-asjs] branch feature/bead-base updated: Went a bit overboard on the utility functions

This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch feature/bead-base
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/bead-base by this push:
     new f8f0dda  Went a bit overboard on the utility functions
f8f0dda is described below

commit f8f0dda47839db6e63ea633c7866d337504ea2b5
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Jan 20 11:08:39 2020 +0200

    Went a bit overboard on the utility functions
---
 .../Basic/src/main/royale/org/apache/royale/core/UIBase.as     |  5 ++---
 .../Basic/src/main/royale/org/apache/royale/css2/Cursors.as    | 10 ++--------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
index 053a730..401c3ea 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
@@ -40,7 +40,6 @@ package org.apache.royale.core
     {
         import org.apache.royale.html.util.addElementToWrapper;
         import org.apache.royale.utils.CSSUtils;
-        import org.apache.royale.utils.html.getStyle;
     }
 
 	/**
@@ -416,7 +415,7 @@ package org.apache.royale.core
             if (!isNaN(_explicitWidth))
                 return _explicitWidth;
             var pixels:Number;
-            var strpixels:String = getStyle(this).width as String;
+            var strpixels:String = element.style.width as String;
             if(strpixels == null)
                 pixels = NaN;
             else
@@ -512,7 +511,7 @@ package org.apache.royale.core
             if (!isNaN(_explicitHeight))
                 return _explicitHeight;
             var pixels:Number;
-            var strpixels:String = getStyle(this).height as String;
+            var strpixels:String = element.style.height as String;
             if(strpixels == null)
                 pixels = NaN;
             else
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/css2/Cursors.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/css2/Cursors.as
index 371e109..91de6da 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/css2/Cursors.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/css2/Cursors.as
@@ -38,10 +38,6 @@ package org.apache.royale.css2
     COMPILE::JS
     {
         import org.apache.royale.core.WrappedHTMLElement;
-        import org.apache.royale.utils.html.getStyle;
-        import org.apache.royale.core.ElementWrapper;
-        import org.apache.royale.utils.html.getStyle;
-        import org.apache.royale.core.ElementWrapper;
     }
 
     /**
@@ -104,7 +100,6 @@ package org.apache.royale.css2
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
-         *  @royaleignorecoercion org.apache.royale.core.ElementWrapper
          */
 		public static function getCursor(obj:IRenderedObject):String
 		{
@@ -117,13 +112,12 @@ package org.apache.royale.css2
             }
             COMPILE::JS
             {
-                return getStyle(obj as ElementWrapper).cursor;
+                return obj.element.style.cursor;
             }
 		}
 
         /**
          *  @private
-         * @royaleignorecoercion org.apache.royale.core.ElementWrapper
          */
 		public static function setCursor(obj:IRenderedObject, cursor:String):void
 		{
@@ -182,7 +176,7 @@ package org.apache.royale.css2
             }
             COMPILE::JS
             {
-                getStyle(obj as ElementWrapper).cursor = cursor;
+                obj.element.style.cursor = cursor;
             }
 
 		}