You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/11/06 21:00:16 UTC

[royale-asjs] branch develop updated (6f686a1 -> e48fd1c)

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

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


    from 6f686a1  fix selectedItem in Jewel DropDownList
     new 9871b72  fix new compiler errors
     new 7b88be2  fix how addingChild/childrenAdded work
     new f6fa4e0  default values
     new e48fd1c  legends now sort of work

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../MXRoyale/src/main/resources/defaults.css       |  4 ++++
 .../MXRoyale/src/main/royale/mx/charts/Legend.as   | 20 ++++++++++++++++++--
 .../src/main/royale/mx/charts/LegendItem.as        | 22 ++++++++++++++++++++++
 .../src/main/royale/mx/charts/series/AreaSeries.as |  2 ++
 .../src/main/royale/mx/charts/series/LineSeries.as |  1 +
 .../src/main/royale/mx/core/UIComponent.as         | 13 ++++++++-----
 .../src/main/royale/mx/core/UITextField.as         |  8 ++++----
 .../src/main/royale/mx/display/Graphics.as         |  4 ++--
 .../MXRoyale/src/main/royale/mx/effects/Effect.as  |  4 ++--
 .../src/main/royale/mx/events/MouseEvent.as        |  8 ++++----
 10 files changed, 67 insertions(+), 19 deletions(-)


[royale-asjs] 01/04: fix new compiler errors

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9871b72c14775ccfa91e9a6e53cf4f95d10127fb
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Nov 6 12:58:29 2018 -0800

    fix new compiler errors
---
 .../projects/MXRoyale/src/main/royale/mx/core/UITextField.as      | 8 ++++----
 frameworks/projects/MXRoyale/src/main/royale/mx/effects/Effect.as | 4 ++--
 .../projects/MXRoyale/src/main/royale/mx/events/MouseEvent.as     | 8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
index 9461bea..0e54fbb 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
@@ -1579,7 +1579,7 @@ public class UITextField  extends UIComponent implements IUITextField
      */
     override public function get measuredHeight():Number
     {
-	return super.measuredHeight();
+    	return super.measuredHeight;
        /*  validateNow();
         
         // If we use device fonts, then the unscaled height is 
@@ -1655,7 +1655,7 @@ public class UITextField  extends UIComponent implements IUITextField
      */
     override public function get measuredWidth():Number
     {
-	return super.measuredWidth();
+	    return super.measuredWidth;
        /*  validateNow();
         
         // If we use device fonts, then the unscaled width is 
@@ -1944,7 +1944,7 @@ public class UITextField  extends UIComponent implements IUITextField
      */
      override public function get styleName():Object /* String, CSSStyleDeclaration, or UIComponent */
      {
-         return super.styleName();
+         return super.styleName;
      } 
 
     /**
@@ -1957,7 +1957,7 @@ public class UITextField  extends UIComponent implements IUITextField
 
          _styleName = value;
 
-		 super.styleName(value);
+		 super.styleName = value;
         // if (parent)
         // {
             // StyleProtoChain.initTextField(this);
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Effect.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Effect.as
index 16a083f..b7b431a 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Effect.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Effect.as
@@ -86,11 +86,11 @@ public class Effect extends org.apache.royale.effects.Effect
 	 
   override public function get duration():Number
 	  {
-	  return super.duration();
+	        return super.duration;
 	  }
   override public function set duration(value:Number):void
 	  {
-	  super.duration(value);
+	        super.duration = value;
 	  } 
 
   
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/events/MouseEvent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/events/MouseEvent.as
index c372493..9b7fdce 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/events/MouseEvent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/events/MouseEvent.as
@@ -58,12 +58,12 @@ public class MouseEvent extends org.apache.royale.events.MouseEvent
     {
 		override public function get stageX():Number
 		{
-			return super.stageX();
+			return super.stageX;
 		}
 		
 		override public function get stageY():Number
 		{
-			return super.stageY();
+			return super.stageY;
 		}
 		override public function updateAfterEvent():void
 		{
@@ -75,12 +75,12 @@ public class MouseEvent extends org.apache.royale.events.MouseEvent
     {
 		public function get stageX():Number
 		{
-			return super.stageX();
+			return screenX;
 		}
 		
 		public function get stageY():Number
 		{
-			return super.stageY();
+			return screenY;
 		}
 		public function updateAfterEvent():void
 		{


[royale-asjs] 04/04: legends now sort of work

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e48fd1c5f504bfa099787a1edf1eb417d1741596
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Nov 6 12:59:46 2018 -0800

    legends now sort of work
---
 .../MXRoyale/src/main/resources/defaults.css       |  4 ++++
 .../MXRoyale/src/main/royale/mx/charts/Legend.as   | 20 ++++++++++++++++++--
 .../src/main/royale/mx/charts/LegendItem.as        | 22 ++++++++++++++++++++++
 .../src/main/royale/mx/charts/series/AreaSeries.as |  2 ++
 .../src/main/royale/mx/charts/series/LineSeries.as |  1 +
 5 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/resources/defaults.css b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
index 182dd55..31abd1e 100644
--- a/frameworks/projects/MXRoyale/src/main/resources/defaults.css
+++ b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
@@ -590,6 +590,10 @@ LegendItem
 	fill: #000000;
 	fontWeight: "bold";
 	fontSize: 10;
+	paddingLeft: 0;
+	paddingRight: 0;
+	paddingTop: 0;
+	paddingBottom: 0;
 }
 
 /*
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/Legend.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/Legend.as
index 7caa377..a671ed3 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/Legend.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/Legend.as
@@ -1432,7 +1432,16 @@ package mx.charts
             invalidateProperties();
             invalidateSize();
             _childrenDirty = true;
-            
+
+            if (parent)
+            {
+                commitProperties();
+                measure();
+                // layoutVertical cares about width/height (via UIComponent unscaledWidth/Height)
+                setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
+                updateDisplayList(width, height);
+            }
+
             dispatchEvent(new Event("collectionChange"));
         }
         
@@ -5716,7 +5725,7 @@ package mx.charts
             
             // Determine the width and height necessary to display the tiles
             // in an N-by-N grid (with number of rows equal to number of columns).
-            var n:int = numChildren;
+            var n:int = this.numChildren;
             
             // Don't count children that don't need their own layout space.
             var temp:int = n;
@@ -6535,6 +6544,13 @@ package mx.charts
             invalidateProperties();
             invalidateSize();
             _childrenDirty = true;;
+            
+            if (parent)
+            {
+                commitProperties();
+                measure();
+                updateDisplayList(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
+            }            
         }
         
         /**
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/LegendItem.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/LegendItem.as
index 7faa5f8..f0a5830 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/LegendItem.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/LegendItem.as
@@ -676,6 +676,28 @@ public class LegendItem extends UIComponent
 			out = 15;
 		return out;
 	}
+    
+    override public function addedToParent():void
+    {
+        super.addedToParent();
+        commitProperties();
+        measure();
+    }
+    
+    /**
+     *  @inheritDoc
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function setActualSize(w:Number, h:Number):void
+    {        
+        super.setActualSize(w, h);
+        updateDisplayList(w, h);
+    }
+
 }
 
 }
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/AreaSeries.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/AreaSeries.as
index f2cfa26..d8f3c67 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/AreaSeries.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/AreaSeries.as
@@ -426,6 +426,7 @@ public class AreaSeries extends Series implements IStackable2
         setStyle("areaFill", value);
         if (parent && areaStroke)
             updateDisplayList(width, height);
+        legendDataChanged();
     }
         
     //-----------------------------------
@@ -452,6 +453,7 @@ public class AreaSeries extends Series implements IStackable2
         setStyle("areaStroke", value);
         if (parent && areaFill)
             updateDisplayList(width, height);
+        legendDataChanged();
     }
     
     //-----------------------------------
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/LineSeries.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/LineSeries.as
index 32c1918..60c6f0f 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/LineSeries.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/series/LineSeries.as
@@ -666,6 +666,7 @@ public class LineSeries extends Series
         setStyle("lineStroke", value);
         if (parent)
             updateDisplayList(width, height);
+        legendDataChanged();
     }
     
     //----------------------------------


[royale-asjs] 03/04: default values

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f6fa4e056cadf7167a93ff4f514ffa26663a39ad
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Nov 6 12:59:32 2018 -0800

    default values
---
 frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as b/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as
index 74c2729..129370a 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as
@@ -182,8 +182,8 @@ package mx.display
 		} 
 		
         private var thickness:int;
-        private var color:uint;
-        private var alpha:Number;
+        private var color:uint = 0;
+        private var alpha:Number = 1.0;
         
 		public function lineStyle(thickness:Number = NaN, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3):void
 		{


[royale-asjs] 02/04: fix how addingChild/childrenAdded work

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7b88be278d989987a3b9771ff359061497779285
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Nov 6 12:59:10 2018 -0800

    fix how addingChild/childrenAdded work
---
 .../MXRoyale/src/main/royale/mx/core/UIComponent.as         | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index c6e044e..052d8dd 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -3092,7 +3092,8 @@ COMPILE::JS
     { override }
     public function $addChild(child:IUIComponent):IUIComponent
     {
-        return addElement(child) as IUIComponent;
+        // this should avoid calls to addingChild/childAdded
+        return super.addElement(child) as IUIComponent;
     }
 
     /**
@@ -3105,7 +3106,6 @@ COMPILE::JS
     public function addChildAt(child:IUIComponent,
                                         index:int):IUIComponent
     {
-        // this should probably call addingChild/childAdded
         return addElementAt(child, index) as IUIComponent;
     }
     
@@ -3115,7 +3115,10 @@ COMPILE::JS
     public function $addChildAt(child:IUIComponent,
                                index:int):IUIComponent
     {
-        return addElementAt(child, index) as IUIComponent;
+        // this should avoid calls to addingChild/childAdded
+        if (index >= super.numElements)
+            return super.addElement(child) as IUIComponent;
+        return super.addElementAt(child, index) as IUIComponent;
     }
 
     /**
@@ -3136,7 +3139,7 @@ COMPILE::JS
     public function $removeChild(child:IUIComponent):IUIComponent
     {
         // this should probably call the removingChild/childRemoved
-        return removeElement(child) as IUIComponent;
+        return super.removeElement(child) as IUIComponent;
     }
     
     COMPILE::JS
@@ -3162,7 +3165,7 @@ COMPILE::JS
     { override }
     public function $removeChildAt(index:int):IUIComponent
     {
-        return removeElement(getElementAt(index)) as IUIComponent;
+        return super.removeElement(getElementAt(index)) as IUIComponent;
     }
 
     /**