flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Fixed JavaScript charts by placing and sizing the ChartDataGroup correctly and by adding some missing getter or setter functions.
Date Tue, 04 Aug 2015 17:25:00 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 7319ba3a3 -> 6175542e8


Fixed JavaScript charts by placing and sizing the ChartDataGroup correctly and by adding some
missing getter or setter functions.


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

Branch: refs/heads/develop
Commit: 6175542e86be0199c5a4f3aa43e300ab05e09648
Parents: 7319ba3
Author: Peter Ent <pent@apache.org>
Authored: Tue Aug 4 13:24:52 2015 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Tue Aug 4 13:24:52 2015 -0400

----------------------------------------------------------------------
 .../flex/charts/beads/ChartItemRendererFactory.as   |  8 ++++++++
 .../src/org/apache/flex/charts/beads/ChartView.as   |  7 +++++++
 .../beads/DataItemRendererFactoryForSeriesData.as   |  4 ++++
 .../flex/charts/beads/layouts/ChartBaseLayout.as    |  4 ++++
 .../flex/charts/optimized/SVGBoxItemRenderer.as     | 12 ++++++++++++
 .../flex/charts/optimized/SVGChartDataGroup.as      |  4 ++++
 .../charts/optimized/SVGLineSegmentItemRenderer.as  |  4 ++++
 .../flex/charts/supportClasses/BoxItemRenderer.as   | 12 ++++++++++++
 .../supportClasses/LineSegmentItemRenderer.as       |  4 ++++
 .../Core/js/src/org/apache/flex/core/UIBase.js      | 11 +++++++++++
 .../apache/flex/core/graphics/GraphicsContainer.js  | 16 ++++++++++++++++
 .../apache/flex/html/supportClasses/DataGroup.js    |  3 +++
 12 files changed, 89 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
index 2909b03..a291365 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
@@ -74,6 +74,10 @@ package org.apache.flex.charts.beads
 		{
 			return _seriesRenderers;
 		}
+		public function set seriesRenderers(value:Array):void
+		{
+			_seriesRenderers = value;
+		}
 		
 		private var _strand:IStrand;
 		
@@ -128,6 +132,10 @@ package org.apache.flex.charts.beads
 			
 			IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
 		}
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
 		
 		/**
 		 * @private

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
index 90b9097..1a88d6f 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
@@ -169,6 +169,13 @@ package org.apache.flex.charts.beads
 				UIBase(horizontalAxisGroup).height = heightAdjustment;
 			}
 			
+			if (dataGroup) {
+				UIBase(dataGroup).x = model.contentX;
+				UIBase(dataGroup).y = model.contentY;
+				UIBase(dataGroup).width = model.contentWidth;
+				UIBase(dataGroup).height = model.contentHeight;
+			}
+			
 			viewport.updateSize();
 			viewport.updateContentAreaSize();
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
index e904375..f6c7562 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
@@ -72,6 +72,10 @@ package org.apache.flex.charts.beads
 			
 			dataProviderChangeHandler(null);
 		}
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
 		
 		/**
 		 * For series data, the 'global' itemRendererFactory is not used. Each series supplies

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
index 87f288b..3f2fd27 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
@@ -48,6 +48,10 @@ package org.apache.flex.charts.beads.layouts
 		{
 			_strand = value;
 		}
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
 		
 		/**
 		 *  Returns the strand, cast as an instance of ChartBase.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
index 8b7055c..971cd46 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
@@ -123,6 +123,10 @@ package org.apache.flex.charts.optimized
 			super.data = value;	
 			drawBar();
 		}
+		override public function get data():Object
+		{
+			return super.data;
+		}
 		
 		/**
 		 *  @copy org.apache.flex.core.UIBase#width
@@ -137,6 +141,10 @@ package org.apache.flex.charts.optimized
 			super.width = value;
 			drawBar();
 		}
+		override public function get width():Number
+		{
+			return super.width;
+		}
 		
 		/**
 		 *  @copy org.apache.flex.core.UIBase#height
@@ -151,6 +159,10 @@ package org.apache.flex.charts.optimized
 			super.height = value;
 			drawBar();
 		}
+		override public function get height():Number
+		{
+			return super.height;
+		}
 		
 		/**
 		 *  @private

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as
index 9df23a8..3d5ec8c 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as
@@ -75,6 +75,10 @@ package org.apache.flex.charts.optimized
 		{
 			_strand = value;
 		}
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
 		
 		/**
 		 *  @copy org.apache.flex.core.IItemRendererParent#getItemRendererForIndex()

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
index d92a0ed..e3bdd94 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
@@ -114,6 +114,10 @@ package org.apache.flex.charts.optimized
 		{
 			super.data = value;	
 		}
+		override public function get data():Object
+		{
+			return super.data;
+		}
 		
 		/**
 		 *  The name of the field containing the value for the Y axis. This is not implemented
by this class.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
index 1bec3b1..a87f5d5 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
@@ -174,6 +174,10 @@ package org.apache.flex.charts.supportClasses
 			super.data = value;	
 			drawBar();
 		}
+		override public function get data():Object
+		{
+			return super.data;
+		}
 		
 		/**
 		 *  @copy org.apache.flex.core.UIBase#width
@@ -188,6 +192,10 @@ package org.apache.flex.charts.supportClasses
 			super.width = value;
 			drawBar();
 		}
+		override public function get width():Number
+		{
+			return super.width;
+		}
 		
 		/**
 		 *  @copy org.apache.flex.core.UIBase#height
@@ -202,6 +210,10 @@ package org.apache.flex.charts.supportClasses
 			super.height = value;
 			drawBar();
 		}
+		override public function get height():Number
+		{
+			return super.height;
+		}
 		
 		/**
 		 *  @private

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
index 850dc42..bff5a80 100644
--- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
@@ -104,6 +104,10 @@ package org.apache.flex.charts.supportClasses
 		{
 			super.data = value;	
 		}
+		override public function get data():Object
+		{
+			return super.data;
+		}
 		
 		/**
 		 *  The name of the field containing the value for the Y axis. This is not implemented
by this class.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js b/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
index 570c606..e8ea3de 100644
--- a/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
@@ -689,6 +689,9 @@ org.apache.flex.core.UIBase.prototype.setHeight =
   if (opt_noEvent === undefined)
     opt_noEvent = false;
 
+  if (value === undefined)
+    value = 0;
+
   var _height = this.CSSHeight;
   if (isNaN(_height) || _height != value) {
     this.positioner.style.height = value.toString() + 'px';
@@ -709,6 +712,9 @@ org.apache.flex.core.UIBase.prototype.setWidth =
   if (opt_noEvent === undefined)
     opt_noEvent = false;
 
+  if (value === undefined)
+    value = 0;
+
   var _width = this.CSSWidth;
   if (isNaN(_width) || _width != value) {
     this.positioner.style.width = value.toString() + 'px';
@@ -730,6 +736,11 @@ org.apache.flex.core.UIBase.prototype.setWidthAndHeight =
   if (opt_noEvent === undefined)
     opt_noEvent = false;
 
+  if (newWidth === undefined)
+    newWidth = 0;
+  if (newHeight === undefined)
+    newHeight = 0;
+
   var _width = this.CSSWidth;
   if (isNaN(_width) || _width != newWidth) {
     this.positioner.style.width = newWidth.toString() + 'px';

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/Graphics/js/src/org/apache/flex/core/graphics/GraphicsContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/js/src/org/apache/flex/core/graphics/GraphicsContainer.js
b/frameworks/projects/Graphics/js/src/org/apache/flex/core/graphics/GraphicsContainer.js
index 8f2b88f..b48b71a 100644
--- a/frameworks/projects/Graphics/js/src/org/apache/flex/core/graphics/GraphicsContainer.js
+++ b/frameworks/projects/Graphics/js/src/org/apache/flex/core/graphics/GraphicsContainer.js
@@ -65,6 +65,10 @@ Object.defineProperties(org.apache.flex.core.graphics.GraphicsContainer.prototyp
                 org.apache.flex.core.graphics.GraphicsContainer, this, 'width', value);
             this.element.setAttribute('width', String(value) + 'px');
             this.element.style.width = String(value) + 'px';
+        },
+        get: function() {
+          return org.apache.flex.utils.Language.superGetter(
+              org.apache.flex.core.graphics.GraphicsContainer, this, 'width');
         }
     },
     /** @export */
@@ -75,6 +79,10 @@ Object.defineProperties(org.apache.flex.core.graphics.GraphicsContainer.prototyp
                 org.apache.flex.core.graphics.GraphicsContainer, this, 'height', value);
             this.element.setAttribute('height', String(value) + 'px');
             this.element.style.height = String(value) + 'px';
+        },
+        get: function() {
+          return org.apache.flex.utils.Language.superGetter(
+              org.apache.flex.core.graphics.GraphicsContainer, this, 'height');
         }
     },
     /** @export */
@@ -87,6 +95,10 @@ Object.defineProperties(org.apache.flex.core.graphics.GraphicsContainer.prototyp
             this.element.style.position = 'absolute';
             this.element.style.left = String(value) + 'px';
             this.element.offsetLeft = value;
+        },
+        get: function() {
+          return org.apache.flex.utils.Language.superGetter(
+              org.apache.flex.core.graphics.GraphicsContainer, this, 'x');
         }
     },
     /** @export */
@@ -99,6 +111,10 @@ Object.defineProperties(org.apache.flex.core.graphics.GraphicsContainer.prototyp
             this.element.style.position = 'absolute';
             this.element.style.top = String(value) + 'px';
             this.element.offsetTop = value;
+        },
+        get: function() {
+          return org.apache.flex.utils.Language.superGetter(
+              org.apache.flex.core.graphics.GraphicsContainer, this, 'y');
         }
     }
 });

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6175542e/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataGroup.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataGroup.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataGroup.js
index f1180f9..c2c5b1f 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataGroup.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataGroup.js
@@ -50,6 +50,9 @@ Object.defineProperties(org.apache.flex.html.supportClasses.DataGroup.prototype,
         /** @this {org.apache.flex.html.supportClasses.DataGroup} */
         set: function(value) {
             this.strand_ = value;
+        },
+        get: function() {
+            return this.strand_;
         }
     },
     /** @export */


Mime
View raw message