flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/refactor-sprite] - plus a straggler
Date Wed, 27 Jul 2016 17:16:33 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite 5c704c98a -> 7031769ef


plus a straggler


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

Branch: refs/heads/refactor-sprite
Commit: 7031769efdd3fe5b99afa62f041f9678d7e5d9a7
Parents: 5c704c9
Author: Harbs <harbs@in-tools.com>
Authored: Wed Jul 27 20:16:26 2016 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Wed Jul 27 20:16:26 2016 +0300

----------------------------------------------------------------------
 .../flex/html/beads/layouts/HScrollBarLayout.as | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7031769e/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HScrollBarLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HScrollBarLayout.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HScrollBarLayout.as
index 38b97ec..efc0230 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HScrollBarLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HScrollBarLayout.as
@@ -18,15 +18,16 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads.layouts
 {
-	import flash.display.DisplayObject;
 	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IScrollBarModel;
 	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
     import org.apache.flex.geom.Rectangle;
 	import org.apache.flex.html.beads.IScrollBarView;
+	import org.apache.flex.html.Button;
 	import org.apache.flex.utils.CSSContainerUtils;
 
     /**
@@ -82,26 +83,27 @@ package org.apache.flex.html.beads.layouts
                 sbModel = _strand.getBeadByType(IScrollBarModel) as IScrollBarModel
 					
 			var metrics:Rectangle = CSSContainerUtils.getBorderAndPaddingMetrics(_strand);
-                    
-			var w:Number = DisplayObject(_strand).width + metrics.left + metrics.right;
-			var increment:DisplayObject = sbView.increment;
-			var decrement:DisplayObject = sbView.decrement;
-			var track:DisplayObject = sbView.track;
-			var thumb:DisplayObject = sbView.thumb;
+            
+            var host:UIBase = UIBase(_strand);
+			var w:Number = host.width + metrics.left + metrics.right;
+			var increment:Button = sbView.increment;
+			var decrement:Button = sbView.decrement;
+			var track:Button = sbView.track;
+			var thumb:Button = sbView.thumb;
 			
 			decrement.x = 0;
 			decrement.y = 0;
-			decrement.height = DisplayObject(_strand).height;
-			decrement.width = DisplayObject(_strand).height;
+			decrement.height = host.height;
+			decrement.width = host.height;
 			
-			increment.height = DisplayObject(_strand).height;
-			increment.width = DisplayObject(_strand).height;
+			increment.height = host.height;
+			increment.width = host.height;
 			increment.x = w - increment.width - 1;
 			increment.y = 0;
 
 			track.x = decrement.width;
 			track.y = 0;
-			track.height = DisplayObject(_strand).height;
+			track.height = host.height;
 			track.width = increment.x - decrement.width;
             thumb.width = sbModel.pageSize / (sbModel.maximum - sbModel.minimum) * track.width;
 			if (track.width > thumb.width)


Mime
View raw message