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

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 41ac999  Make positioner returns _postiioner in StyledUIBase components
41ac999 is described below

commit 41ac99912fbb15401187a2e1c09c3156c611fe3e
Author: Carlos Rovira <carlosrov...@apache.org>
AuthorDate: Fri Jun 29 17:34:02 2018 +0200

    Make positioner returns _postiioner in StyledUIBase components
---
 .../royale/org/apache/royale/core/StyledUIBase.as    | 20 ++++++++++++++++++++
 .../main/royale/org/apache/royale/jewel/Button.as    |  3 +++
 .../main/royale/org/apache/royale/jewel/CheckBox.as  | 17 +----------------
 .../royale/org/apache/royale/jewel/DropDownList.as   |  1 +
 .../src/main/royale/org/apache/royale/jewel/Label.as |  2 ++
 .../royale/org/apache/royale/jewel/RadioButton.as    | 17 +----------------
 .../main/royale/org/apache/royale/jewel/Slider.as    | 17 +----------------
 .../main/royale/org/apache/royale/jewel/TextArea.as  | 17 +----------------
 .../main/royale/org/apache/royale/jewel/TextInput.as | 17 +----------------
 9 files changed, 31 insertions(+), 80 deletions(-)

diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
index 0e10e72..b546053 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
@@ -20,6 +20,11 @@ package org.apache.royale.core
 {
     import org.apache.royale.utils.ClassSelectorList;
 
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
+
     /**
      *  The StyledUIBase is the base class for UIBase components that makes
      *  heavy use of styles
@@ -45,6 +50,21 @@ package org.apache.royale.core
             classSelectorList = new ClassSelectorList(this);
                }
 
+        COMPILE::JS
+               private var _positioner:WrappedHTMLElement;
+
+               COMPILE::JS
+               override public function get positioner():WrappedHTMLElement
+               {
+                       return _positioner;
+               }
+
+               COMPILE::JS
+               override public function set 
positioner(value:WrappedHTMLElement):void
+               {
+                       _positioner = value;
+               }
+
         protected var classSelectorList:ClassSelectorList;
 
         COMPILE::JS
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index a06b9ab..1630850 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -444,6 +444,9 @@ package org.apache.royale.jewel
                 var impl:Object = 
org.apache.royale.core.ValuesManager.valuesImpl.
                     getValue(this, 'iStatesImpl');
             }*/
+            positioner = element;
+
+
             return element;
         }
        }
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
index b1d19ea..f0d4488 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
@@ -191,21 +191,6 @@ package org.apache.royale.jewel
 
         COMPILE::JS
         protected var label:HTMLLabelElement;
-
-        COMPILE::JS
-               private var _positioner:WrappedHTMLElement;
-
-               COMPILE::JS
-               override public function get positioner():WrappedHTMLElement
-               {
-                       return _positioner;
-               }
-
-               COMPILE::JS
-               override public function set 
positioner(value:WrappedHTMLElement):void
-               {
-                       _positioner = value;
-               }
         
         /**
          * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
@@ -227,7 +212,7 @@ package org.apache.royale.jewel
             label.appendChild(checkbox);
             
             positioner = label as WrappedHTMLElement;
-            _positioner.royale_wrapper = this;
+            positioner.royale_wrapper = this;
             //(input as WrappedHTMLElement).royale_wrapper = this;
             //(checkbox as WrappedHTMLElement).royale_wrapper = this;
             return element;
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DropDownList.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DropDownList.as
index ea273bb..5091738 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DropDownList.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DropDownList.as
@@ -229,6 +229,7 @@ package org.apache.royale.jewel
             (element as HTMLSelectElement).size = 1;
             goog.events.listen(element, 'change',
                 changeHandler);
+            positioner = element;
             return element;
         }
 
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as
index dff96bc..5ae061b 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as
@@ -204,6 +204,8 @@ package org.apache.royale.jewel
             textNode = document.createTextNode(_text) as Text;
             element.appendChild(textNode);
             
+            positioner = element;
+
             return element;
         }
 
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
index 01a4e7f..4c2758f 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
@@ -313,21 +313,6 @@ package org.apache.royale.jewel
         private var label:HTMLLabelElement;
         private var textNode:Text;
 
-        COMPILE::JS
-               private var _positioner:WrappedHTMLElement;
-
-               COMPILE::JS
-               override public function get positioner():WrappedHTMLElement
-               {
-                       return _positioner;
-               }
-
-               COMPILE::JS
-               override public function set 
positioner(value:WrappedHTMLElement):void
-               {
-                       _positioner = value;
-               }
-
         /**
          * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
          * @royaleignorecoercion HTMLLabelElement
@@ -352,7 +337,7 @@ package org.apache.royale.jewel
             label.appendChild(radio);
             
             positioner = label as WrappedHTMLElement;
-            _positioner.royale_wrapper = this;
+            positioner.royale_wrapper = this;
             
             return element;
         }
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
index adc6fa0..51d374b 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
@@ -190,21 +190,6 @@ package org.apache.royale.jewel
             IRangeModel(model).stepSize = value;
         }
 
-               COMPILE::JS
-               private var _positioner:WrappedHTMLElement;
-
-               COMPILE::JS
-               override public function get positioner():WrappedHTMLElement
-               {
-                       return _positioner;
-               }
-
-               COMPILE::JS
-               override public function set 
positioner(value:WrappedHTMLElement):void
-               {
-                       _positioner = value;
-               }
-
         /**
          * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
                 * @royaleignorecoercion HTMLInputElement
@@ -221,7 +206,7 @@ package org.apache.royale.jewel
                        div.appendChild(input);
 
             positioner = div as WrappedHTMLElement;
-            _positioner.royale_wrapper = this;
+            positioner.royale_wrapper = this;
                        
                        return element;
         }
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextArea.as 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextArea.as
index cebdddf..9f64aa9 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextArea.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextArea.as
@@ -107,21 +107,6 @@ package org.apache.royale.jewel
             }
         }
         
-        COMPILE::JS
-               private var _positioner:WrappedHTMLElement;
-
-               COMPILE::JS
-               override public function get positioner():WrappedHTMLElement
-               {
-                       return _positioner;
-               }
-
-               COMPILE::JS
-               override public function set 
positioner(value:WrappedHTMLElement):void
-               {
-                       _positioner = value;
-               }
-        
         /**
          * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
          * @royaleignorecoercion HTMLDivElement
@@ -154,7 +139,7 @@ package org.apache.royale.jewel
 
             positioner = div as WrappedHTMLElement;
             //(label as WrappedHTMLElement).royale_wrapper = this;
-            _positioner.royale_wrapper = this;
+            positioner.royale_wrapper = this;
             
             return element;
         }
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextInput.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextInput.as
index e26b591..fd6dd2a 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextInput.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextInput.as
@@ -54,21 +54,6 @@ package org.apache.royale.jewel
             typeNames = "jewel textinput";
                }
         
-        COMPILE::JS
-               private var _positioner:WrappedHTMLElement;
-
-               COMPILE::JS
-               override public function get positioner():WrappedHTMLElement
-               {
-                       return _positioner;
-               }
-
-               COMPILE::JS
-               override public function set 
positioner(value:WrappedHTMLElement):void
-               {
-                       _positioner = value;
-               }
-        
         /**
          * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
          * @royaleignorecoercion HTMLDivElement
@@ -99,7 +84,7 @@ package org.apache.royale.jewel
 
             positioner = div as WrappedHTMLElement;
             //(label as WrappedHTMLElement).royale_wrapper = this;
-            _positioner.royale_wrapper = this;
+            positioner.royale_wrapper = this;
             
             return element;
         }

Reply via email to