You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/06/06 15:44:10 UTC

git commit: [flex-asjs] [refs/heads/release0.8.0] - Fix for FLEX-35322: NumericStepper layout.

Repository: flex-asjs
Updated Branches:
  refs/heads/release0.8.0 a9321c529 -> a2c5fb663


Fix for FLEX-35322: NumericStepper layout.


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

Branch: refs/heads/release0.8.0
Commit: a2c5fb6635f8892e80d7af57dcbbf2cd37ab7ceb
Parents: a9321c5
Author: Peter Ent <pe...@apache.org>
Authored: Tue Jun 6 11:44:07 2017 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Jun 6 11:44:07 2017 -0400

----------------------------------------------------------------------
 .../flex/org/apache/flex/html/beads/NumericStepperView.as | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a2c5fb66/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/NumericStepperView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/NumericStepperView.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/NumericStepperView.as
index 032e46e..15e2321 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/NumericStepperView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/NumericStepperView.as
@@ -120,8 +120,8 @@ package org.apache.flex.html.beads
 			input.text = String(spinner.value);
 			
             var host:ILayoutChild = ILayoutChild(value);
-            if ((host.isWidthSizedToContent() || isNaN(host.explicitWidth)) &&
-                (host.isHeightSizedToContent() || isNaN(host.explicitHeight)))
+            if ((!host.isWidthSizedToContent() && !isNaN(host.explicitWidth)) ||
+                (!host.isHeightSizedToContent() && !isNaN(host.explicitHeight)))
                 sizeChangeHandler(null);
 		}
 		
@@ -130,12 +130,12 @@ package org.apache.flex.html.beads
 		 */
 		private function sizeChangeHandler(event:Event) : void
 		{
-			input.x = 2;
-			input.y = (UIBase(_strand).height - input.height)/2;
+			input.x = 0;
+			input.y = 0;
 			input.width = UIBase(_strand).width-spinner.width-2;
 			COMPILE::SWF
 			{
-			spinner.x = input.width+2;
+			spinner.x = input.width;
 			spinner.y = 0;
 			}
 		}


Re: git commit: [flex-asjs] [refs/heads/release0.8.0] - Fix for FLEX-35322: NumericStepper layout.

Posted by Harbs <ha...@gmail.com>.
Nope. Looks right to me.

> On Jun 7, 2017, at 3:03 AM, Justin Mclean <ju...@classsoftware.com> wrote:
> 
> Hi,
> 
> Not 100% sure and I probably not understanding what these methods are doing but perhaps the issue is in isHeightSizedToContent / isWidthSizedToContent.
> 
> Does the last line of each function look suspect to anyone else?
> 
> return (left === undefined || right === undefined);
> 
> return (top === undefined || bottom === undefined); 
> 
> I would of expected that && be used rather than ||?
> 
> Thanks,
> Justin
> 


Re: git commit: [flex-asjs] [refs/heads/release0.8.0] - Fix for FLEX-35322: NumericStepper layout.

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

Not 100% sure and I probably not understanding what these methods are doing but perhaps the issue is in isHeightSizedToContent / isWidthSizedToContent.

Does the last line of each function look suspect to anyone else?

return (left === undefined || right === undefined);

return (top === undefined || bottom === undefined); 

I would of expected that && be used rather than ||?

Thanks,
Justin