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/08/02 00:44:25 UTC
[royale-asjs] 22/29: emulate scrollpositions
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 5cc4f67d1a99d1e3cdab5c487ecfb4c75ba2440c
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Aug 1 14:55:01 2018 -0700
emulate scrollpositions
---
.../src/main/royale/mx/core/ScrollControlBase.as | 65 +++++++++++-----------
1 file changed, 33 insertions(+), 32 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as
index 1f35b0d..2dba2ed 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as
@@ -39,8 +39,9 @@ import mx.events.ScrollEventDirection;
import mx.managers.ToolTipManager;
import mx.styles.ISimpleStyleClient;
-use namespace mx_internal;
*/
+use namespace mx_internal;
+import org.apache.royale.events.Event;
/**
* Dispatched when the content is scrolled.
@@ -350,11 +351,11 @@ public class ScrollControlBase extends UIComponent
* @private
* Storage for the horizontalScrollPosition property.
*/
-// mx_internal var _horizontalScrollPosition:Number = 0;
-//
-// [Bindable("scroll")]
-// [Bindable("viewChanged")]
-// [Inspectable(defaultValue="0")]
+ mx_internal var _horizontalScrollPosition:Number = 0;
+
+ [Bindable("scroll")]
+ [Bindable("viewChanged")]
+ [Inspectable(defaultValue="0")]
/**
* The offset into the content from the left edge. This can
@@ -369,25 +370,25 @@ public class ScrollControlBase extends UIComponent
* @playerversion AIR 1.1
* @productversion Flex 3
*/
-// public function get horizontalScrollPosition():Number
-// {
-// return _horizontalScrollPosition;
-// }
+ public function get horizontalScrollPosition():Number
+ {
+ return _horizontalScrollPosition;
+ }
/**
* @private
* This only moves the scrollBars -- assumes the call emanated
* from the scrollable content.
*/
-// public function set horizontalScrollPosition(value:Number):void
-// {
-// _horizontalScrollPosition = value;
-//
+ public function set horizontalScrollPosition(value:Number):void
+ {
+ _horizontalScrollPosition = value;
+
// if (horizontalScrollBar)
// horizontalScrollBar.scrollPosition = value;
-//
-// dispatchEvent(new Event("viewChanged"));
-// }
+
+ dispatchEvent(new Event("viewChanged"));
+ }
//----------------------------------
// horizontalScrollPolicy
@@ -687,11 +688,11 @@ public class ScrollControlBase extends UIComponent
* @private
* Storage for the verticalScrollPosition property.
*/
-// mx_internal var _verticalScrollPosition:Number = 0;
+ mx_internal var _verticalScrollPosition:Number = 0;
-// [Bindable("scroll")]
-// [Bindable("viewChanged")]
-// [Inspectable(defaultValue="0")]
+ [Bindable("scroll")]
+ [Bindable("viewChanged")]
+ [Inspectable(defaultValue="0")]
/**
* The offset into the content from the top edge. This can
@@ -706,23 +707,23 @@ public class ScrollControlBase extends UIComponent
* @playerversion AIR 1.1
* @productversion Flex 3
*/
-// public function get verticalScrollPosition():Number
-// {
-// return _verticalScrollPosition;
-// }
+ public function get verticalScrollPosition():Number
+ {
+ return _verticalScrollPosition;
+ }
/**
* @private
*/
-// public function set verticalScrollPosition(value:Number):void
-// {
-// _verticalScrollPosition = value;
-//
+ public function set verticalScrollPosition(value:Number):void
+ {
+ _verticalScrollPosition = value;
+
// if (verticalScrollBar)
// verticalScrollBar.scrollPosition = value;
-//
-// dispatchEvent(new Event("viewChanged"));
-// }
+
+ dispatchEvent(new Event("viewChanged"));
+ }
//----------------------------------
// verticalScrollPolicy